better fix for unicity checks : implement query.has_results()