models/search: Remove uneeded if test
query: Strip empty conditions using regexp
query: Define a common (match-condition)
query: Rename conditional to condition
query: Use shorthand anonymous function syntax