Typescript Check If Object Is Interface