Due to bugs, if object is not found an error is usually thrown.
3.1 Beta 2
Example
Always wrap calls to objFromId() in try...catch blocks...
var lookingFor = {id:63};
var found;
try {
found = objFromId(lookingFor);
} catch(e) {
found = null;
}
if (found) {
// do stuff with 'found' game object
}