Only remove the role attribute if the object has it