add sanity check if the data from sync is an array.