Copied TypeConverter from sweetener project