Catch error if distributions is nil
Merge pull request #426 from theodi/bugfix-catch-error-if-distributions-is-nil

Catch error if distributions is nil