Improve check for axes in generateLabelValue()