code: public void setValue(String key, String value) {
          KeyValue kv = getKV(key);
          if (kv != null) {
              kv.setValue(value);
          } else if (key != null) {
              map.add(new KeyValue(key,value));
          }
      }
docs: Null value is totally legal!