upsert handling of empty response.

I ran into this today and thought you might want the fix.  Just cleans up warnings I guess, but should be there.