We should probably also validate that the keys are unicode values, I think.