Protect against NaN rotation values

Throws an Error if a DisplayObject's rotation was set to NaN. Without this check, Sprite's textures could disappear silently, with no reference to the improper rotation value as the culprit.