Properly check if distribution exists

self.k is a sorted set, not a string
Merge pull request #13 from cpdomina/patch-1

Properly check if distribution exists