Added condition to make sure field data_source value exists
Added check where no data sets are available