Typescript Check If Variable Exists