Defined()
Most of us might be aware of this function but i came it across quite recently. There can be multiple scenarios in scripting where we need to check whether any variable is defined in the code or not. Defined() method does the trick here. This can come handy before you nullify any object. More of this function details are available on support web. Basic Syntax is defined(AnyVariable) Output: returns True/False based on whether Object/variable is defined or not. Example Usage: if(defined(sAccountBO) sAccountBO = null;