Fix traceback when utils.str.dqrepr is given a unicode object.