This raises the question if you can create a mesh with no elements. I will test this and if it is possible I can add the condition.