avoid NoneType exception if there is no data set selected