Add few more methods to search QueryContext to avoid passing null if the query can be discovered