how to check if an object is a class typescript code example Example: typescript check type mySprite instanceof Sprite;