Use angular type checkers instead of typeof