Catch error if distributions is nil

Partially addresses #425 - if there are no distributions for dataset, then things don't explode.