Move error check to ESQuerySet and test it