Check for valid object ID