handle case where response is None