double? currencyToDouble(Currency? currency) { return currency == null ? null : double.parse(currency.toString()); }