Re-commented the code of the function ds.checkvar.