added parameter validation to getCurrencyRate()