Python3 compat for checking whether a string is unicode