# isNil

**Kind:** Function

**Source:** [`packages/common/utils/shared.utils.ts`](https://github.com/nestjs/nest/blob/master/packages/common/utils/shared.utils.ts#L48)

**Part of:** [Common](subsystem-packages-common)

## Signature

```ts
function isNil(val: any): val is null | undefined
```

## Parameters

| Name | Type |
|---|---|
| `val` | `any` |

**Returns:** `val is null | undefined`

## Used by

26 references from 26 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

### Imported by (26)

- `AdditionalHeaders` — `packages/core/router/sse-stream.ts`:38
- `UNKNOWN_DEPENDENCIES_MESSAGE` — `packages/core/errors/messages.ts`:63
- `callBeforeAppShutdownHook` — `packages/core/hooks/before-app-shutdown.hook.ts`:49
- `callModuleBootstrapHook` — `packages/core/hooks/on-app-bootstrap.hook.ts`:43
- `callAppShutdownHook` — `packages/core/hooks/on-app-shutdown.hook.ts`:45
- `callModuleDestroyHook` — `packages/core/hooks/on-module-destroy.hook.ts`:41
- `callModuleInitHook` — `packages/core/hooks/on-module-init.hook.ts`:37
- `InjectorDependency` — `packages/core/injector/injector.ts`:51

…and 18 more.
