Added a callback function nil guard to the resp.