Fixing potential NPEs in PooledSemanticDatabase.getQueryResults()