Fix creating grid with nan grid resolution when there are no objects in the scene.