check whether data was inserted correctly.