Renamed valid_params? to check_for_api_errors and simplified code.