Fix - check if batch['hits'] isn't nil

In some cases batch['hits'] is nil, and calling batch['hits']['hits'] was making the gem crash