Convert to Dict key type before hashing