Typescript Check If Variable Is Of Type Interface