Function Updated 30 May 2026
isNotNull(value)
Checks if specified value is not null.
Parameters
valueanyrequiredThe value to check.
Returns
True if value is not null, otherwise false.
Example
Mixed HTML (or any text file) with inline JavaScript between hash signs.
<p>
Is value1 not null?
#docly.isNotNull(value1) ? "Yes" : "No"#
</p>
<p>
Is value2 not null?
#docly.isNotNull(value2) ? "Yes" : "No"#
</p>The template above produces this output:
<p>
Is value1 not null?
Yes
</p>
<p>
Is value2 not null?
No
</p>Normal JavaScript, running in the browser or on the Docly™ server.
write(docly.isNotNull(null));
write("\n");
write(docly.isNotNull("hello"));
/* Expected output:
false
true
*/The JavaScript above produces this output:
false
trueThe data the example runs with:
{
"value1" : "asdf",
"value2" : null
}