null is actually a valid value. It will simply result in the tolerance being ignored. However I've add the null check only when color tolerance is > 0.