public static String toHostString(Object val) {
    if (val instanceof String) {
      return trimLeadingSlash((String) val);
    }

    if (val instanceof InetAddress) {
      return ((InetAddress) val).getHostAddress();
    }

    return trimLeadingSlash(val.toString());
  }
Returns a string version of {@code InetAddress} which can be converted back later. Essentially
any leading slash is trimmed.

@param val The InetAddress or String to return a formatted string of

@return The string version of the InetAddress minus any leading slash
geode-core/src/main/java/org/apache/geode/admin/internal/InetAddressUtils.java