Typescript Check If Variable Is Null