Fix nil pointer dereference on empty responses