Client: Make the query builder nullable in filteredQuery.

Close #7398