remove attributes set to null