How to Check a Variable Type in TypeScript with typeof | CodeTrail