code: public ValueMap with(String key, Object val) {
          if (val == this)
              throw new IllegalArgumentException("Self reference is not allowed");
          // TODO: fail fast if val is not a supported type
          super.put(key, val);
          return this;
      }
docs: Sets the value of the specified key to the given value. A
  value can be a
  <ul>
  <li>Number</li>
  <li>String</li>
  <li>binary (ie byte array or byte buffer)</li>
  <li>boolean</li>
  <li>null</li>
  <li>list (of any of the types on this list)</li>
  <li>map (with string key to value of any of the types on this list)</li>
  <li>set (of any of the types on this list)</li>
  </ul>