Skip to content

isNull() function

Checks if the given value is null.

Signature:

typescript
isNull: <T>(input: T) => input is T & null

Example

ts
isNull(1); // false
isNull('1'); // false
isNull(undefined); // false
isNull(null); // true

Open Source Code

Released under the Apache-2.0 License.