Prevent NPE from query result lazy evaluation