Type guard: checks if a value is nullish (null or undefined).
null
undefined
The value to check.
true if nullish.
true
isNullish(null); // trueisNullish(undefined); // trueisNullish(0); // false Copy
isNullish(null); // trueisNullish(undefined); // trueisNullish(0); // false
Type guard: checks if a value is nullish (
nullorundefined).