Skip to main content
Version: 1.3.0

isNull

Using

This function determines whether the given value is exactly null.

  • Returns true only for the null literal.
  • Returns false for any other value, including undefined, false, 0, "", NaN, objects, arrays, and other falsy types.
Demo - use JSON
isNull(
)
true

Arguments

ArgumentTypeDescriptionExample
valueunknownCan be any type"text"
2
undefined

Returns

booleantrue if value is null, false otherwise

Examples

isNull(null);
// true

isNull(undefined);
// false

isNull(0);
// false

isNull('');
// false

isNull({});
// false

isNull(Object.create(null));
// false

isNull(() => null);
// false

Resources

📦 Since:1.3.0
📦 Last updated:1.3.0
📦 Available in:1.3.0