Typescript Check If Object Is Of Class