Validate thresholds

Adds an exception if the wrong threshold is chosen.