better where condition handling on query DSL