check for valid object