nil()

The nil() function of the GlideSystem class can be used to query the value of an object. It returns true if the value of the object is either null or empty; otherwise, returns false.

Example:

if ( current.short_description.nil() ) {  //checking if the value of the filed is null 
//some code 
} 

Get ServiceNow Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.