Make sure to check whether a unicode string is passed in before converting