code: @CheckForNull
      public static Number tryParseNumber(@CheckForNull String numberStr, @CheckForNull Number defaultNumber) {
          if ((numberStr == null) || (numberStr.length() == 0)) {
              return defaultNumber;
          }
          try {
              return NumberFormat.getNumberInstance().parse(numberStr);
          } catch (ParseException e) {
              return defaultNumber;
          }
      }
docs: Returns the parsed string if parsed successful; otherwise returns the default number.
  If the string is null, empty or a ParseException is thrown then the defaultNumber
  is returned.
  @param numberStr string to parse
  @param defaultNumber number to return if the string can not be parsed
  @return returns the parsed string; otherwise the default number