Put check in object.js for object being undefined

This will happen if there is no object with the nodeID provided to the internals() function.  We have only seen this happen when a second client joins and children of a node are added in a different order, resulting in node ids that don't match.  We do not know what caused that, and we cannot reproduce it (it only happened once).  As a result, we have placed this check to see if we can catch it in the act. I am marking the associated task as complete for now.
fixes #2558