Javascript Check If Object Is Valid June 30, 2008 by blogmeister·2 Comments Share the post "Javascript Check If Object Is Valid" FacebookTwitterGoogle+PinterestLinkedIn Checks if an object exists in the document using Javascript. JavaScript function isValidObject(objToTest) { if (null == objToTest) return false; if ("undefined" == typeof(objToTest)) return false; return true; } 12345 function isValidObject(objToTest) { if (null == objToTest) return false; if ("undefined" == typeof(objToTest)) return false; return true;}