Handlebars Helper Function: isNullDefault
Returns a default value when the first value is null.
This helper is available in the Winter ’27 release of Marketing Cloud Next.
| Parameter | Type | Description |
|---|---|---|
nonNullValue | Any | Required. The value to return when it isn’t null. |
nullValue | Any | Required. The default value to return when nonNullValue is null. |
The function returns nonNullValue unless the value is null. When nonNullValue is null, it returns nullValue.
This example returns a customer’s membership tier, returning Basic if the value of tier is null.
If the tier variable resolves to any value, such as "Premium", the function returns that value.
If tier is null, the function returns the fallback value.