code: public StringClauses replaceIfExists(String key, String newValue) throws IllegalArgumentException {
          if (contains(key)) {
              return replaceImpl(key, StringUtil.trimToEmpty(newValue));
          } else {
              return this;
          }
      }
docs: Replaces the given key with a new string. If the existing key does not exist, throws IllegalArgumentException