Check If Variable Is Null Typescript Compiler