isNull es-toolkit
Checks if a value is null.
Usage
isNull(value)
Use isNull when you want to check if a value is exactly null. It uses strict equality (===) to recognize only null and not undefined.
It can also be used as a type guard in TypeScript.
isNull is different from isNil in that it treats undefined as false.
Parameters
valueunknownrequired
The value to check if it's null.
Returns
Returns true if the value is null, false otherwise.
Source: es-toolkit
Re-exported verbatim from es-toolkit. Implementation, edge cases, and performance behavior are owned upstream. This page mirrors the documentation at the pinned version; the linked source is authoritative.