convert.py: Replace type checks with isinstance.
Add missing not.
Merge pull request #23 from StevenMaude/better_type_checking

convert.py: Replace type checks with isinstance.