Avoid trying to set the id if the response is null.

This probably should have been included in pull request #20.