MODE-1827 - NullPointerException in RepositoryQueryManager

Null check in case the node no longer exist in the cache.