Typescript Check If Variable Is Of Interface