Right now if you call KeySpacePath.add it takes the object, and only validates that it is the constant if appropriate, but not that it is the right value. This means, one could be adding longs where there should be strings (e.g.).
It would be good to add this validation but care needs to be taken, because if anything is already storing data with the wrong values, we don't want to break that access.