how to check is object in typescript code example Example: typescript check type mySprite instanceof Sprite;