strictNullChecks

The compiler option that makes null and undefined separate types, so you must handle them before using a value.

In more detail

Without it, any variable could secretly be null and crash when used. With it, findUser returning string | undefined forces a check before calling toUpperCase. It is part of strict mode.

Related terms

Taught in

References