How To Check Type In Typescript