Check the incoming object before attempting to parse it