check that data is not empty