Safer checking for octree conversion from stream