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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.