isNil source npm

_.isNil(value)

Checks if value is null or undefined.

Arguments

  1. value (*)

    The value to check.

Returns (boolean)

Returns true if value is nullish, else false.

Example

_.isNil(null);
// => true

_.isNil(void 0);
// => true

_.isNil(NaN);
// => false