Check if string is unicode with isinstance instead of type