Throws an error if rectangle is missing fields or they are not valid.
Checks:
width
height
rect
If rect has x,y, this value is checked as well.
Throws an error if rectangle is missing fields or they are not valid.
Checks:
widthandheightmust be defined onrectIf
recthas x,y, this value is checked as well.