#8 set data to null if undefined in addData()