added a check to CategoricalMethod