This should always be used instead of checking type==OBJECT because ScriptFunction, ScriptArray, and ScriptString are valid subclasses of ScriptObject.
See Implementation
This should always be used instead of checking type==OBJECT because ScriptFunction, ScriptArray, and ScriptString are valid subclasses of ScriptObject.