Make url and api_token nil-safe