The value to check
true if the value is strictly null or undefined, narrowing the type to null | undefined.
isStrictNullOrUndefined(null); // true
isStrictNullOrUndefined(undefined); // true
isStrictNullOrUndefined("undefined"); // false
let value = null;
isStrictNullOrUndefined(value); // true
let value = undefined;
isStrictNullOrUndefined(value); // true
isStrictNullOrUndefined(""); // false
isStrictNullOrUndefined(0); // false
isStrictNullOrUndefined(new Date()); // false
isStrictNullOrUndefined(true); // false
isStrictNullOrUndefined(false); // false
Checks if the provided value is strictly
nullorundefined. A string value of"undefined"is NOT considered to be undefined. When this function returnstrue, TypeScript narrows the type tonull | undefined.