---
schema_version: "1"
id: 7193d184eb2abdc46a80d854a9aed929de45368f21eb330efb6e58e3371040ce
title: IsNull()
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/ampscript/references/utilities/mc-ampscript-reference-utilities-is-null.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-utilities/mc-ampscript-reference-utilities-is-null.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 08b0a8ec7fa8427e2466477851a6f8543542b63e0908ecb759e7b1e8159c9ee1
products:
  - AMPscript for Marketing Cloud
  - Marketing Cloud
---
# IsNull()

Tests whether the value of a variable or function is null. If the value is null, the function returns `true`. Otherwise, it returns `false`.

This function is similar to the `Empty()` function. However, the `Empty()` function returns `true` if the value of a function or variable is an empty string, while the `IsNull()` function doesn’t.

## Availability

<table>
  <tr>
    <td>Marketing Cloud Engagement</td>
    <td>✅ Yes</td>
  </tr>
  <tr>
    <td>Marketing Cloud Next</td>
    <td>✅ Yes</td>
  </tr>
</table>

This function became available in Marketing Cloud Next during the Summer ’26 release (API version 67.0).

## Syntax

```
IsNull(valueToTest)
```

The `IsNull()` function has one parameter:

- `valueToTest` (string): Required. A variable or function to test for a null value.

## Usage

This example declares a variable without setting it, making the value of the variable null. It then uses the `IsNull()` function to test whether the value of the variable is null.

```
%%[ Var @n ]%%
<p> %%= IsNull(@n) =%%</p>
```

The example outputs this result.

```
true
```
