Check for quadtree validity before querying.