I am using this code to check undefined variable but it\'s not working.
In Typescript 2 you can use Undefined type to check for undefined values. So if you declare a variable as:
let uemail : string | undefined;
Then you can check if the variable z is undefined as:
if(uemail === undefined) { }