if I understand this correctly, it is equivalent of just saying  
else if (attributeSet.getSelectedAttribute() != null)