Refactor with getAttributeDisplayString.