Users can test both null and undefined at once in TypeScript using the following syntax.

if (x == null) {

BY Best Interview Question ON 25 Jul 2020