isNotNull(value) Last updated: 16. May 2026
Checks if specified value is not null.
See also: isNull assert areNotEqual
Parameters
| Name | Type | Description |
|---|---|---|
| value | any | The value to check. |
Returns
True of value is not null, otherwise false.
Example
Data
{
"value1" : "asdf",
"value2" : null
} Code example (#JS)
#JS is mixed HTML (or other text file) with inline JavaScript with # starting and ending each inline statement.<p>
Is value1 not null?
#docly.isNotNull(value1) ? "Yes" : "No"#
</p>
<p>
Is value2 not null?
#docly.isNotNull(value2) ? "Yes" : "No"#
</p> Output
The #JS code above produces the output shown below:<p>
Is value1 not null?
Yes
</p>
<p>
Is value2 not null?
No
</p> Code example (JS)
JS is normal JavaScript either running in the browser or on the Docly™ server.write(docly.isNotNull(null));
write("\n");
write(docly.isNotNull("hello"));
/* Expected output:
false
true
*/ Output
The JS code above produces the output shown below:false
true