Empty parameters of query should be treated as nil