Merge pull request #1048 from Ayrx/change-unicode-check

Fixed TypeError and added documentation