Fix check for API object.