check whether the data is correct