clean up attribute value if statement