Fix an issue with casting string values which contain non-ascii (unicode)
characters.
Only convert value to unicode if it's not already represented as unicode.
Resolve merge conflict manually