private static Integer tryParseInt(final String val) {
    if (StringUtils.isEmpty(val)) {
      return null;
    }
    try {
      return Integer.parseInt(val);
    } catch (NumberFormatException e) {
      return null;
    }
  }
Adds {@code value} to {@code encoder} under {@code paramName} when {@code value} is non-null.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/http/MetaBrowser.java