TypeScript: FIxes intellisense condition (#812) 

* Code: Null checks.