isValidDataset function

Check the validity of a dataset