Partially implement addKey and setValue in KeyValueMap