Skip to main content
isNullOrUndefined - node__util.d.ts - Node documentation
function isNullOrUndefined

Usage in Deno

```typescript import { isNullOrUndefined } from "node:node__util.d.ts"; ```
isNullOrUndefined(object: unknown): object is null | undefined
Deprecated
Since v4.0.0 - Use `value === undefined || value === null` instead.
Returns `true` if the given `object` is `null` or `undefined`. Otherwise, returns `false`. ```js import util from 'node:util'; util.isNullOrUndefined(0); // Returns: false util.isNullOrUndefined(undefined); // Returns: true util.isNullOrUndefined(null); // Returns: true ```

Parameters

object: unknown

Return Type

object is null | undefined