We need to make sure the attributes exist before setting them