Merge pull request #6 from berkerpeksag/use-isinstance

Use the isinstance() builtin function for type comparisons.