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 

Marketing Cloud Engagement ✅ Yes
Marketing Cloud Next ✅ Yes

This function became available in Marketing Cloud Next during the Summer ’26 release (API version 67.0).

Syntax 

1IsNull(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.

1%%[ Var @n ]%%
2<p> %%= IsNull(@n) =%%</p>

The example outputs this result.

1true