code: private Currency getCurrency(String currencyCode) {
          try {
              return Currency.getInstance(currencyCode);
          } catch (Exception e) {
              return null;
          }
      }
docs: Method to safely access a {@link java.util.Currency}.
  If no such currency exists, null is returned.
  
  @param currencyCode the currency code , not null.
  @return the corresponding currency instance, or null.