Check for valid utf8 string