Fix potential for null when getting the currency.