Paramter checking in calculateDistribution