Added a series of validate

to avoid error messages when switching data set