Apply type transformation in RangeConstraint if value is not of the appropriate type