Helps identify correctly the type of whatever you put as an argument. This was adapted from http://www.planetpdf.com/developer/article.asp?ContentID=testingforobjecttypesin_ja var is={ Null:function(a){ return a===null; }, Undefined:function(a){ return a===undefined; }, nt:function(a){ return(a===null||a===undefined); }, Function:function(a){ return(typeof(a)==='function')?a.constructor.toString()