fix for empty document as query field value