Ensure that initially null attributes are not added to element.