Added null reference check on labelMesh