How to Check for null and undefined in TypeScript | CodeTrail