use isinstance() instead of comparing types
Merge pull request #14 from fly/isinstance

use isinstance() instead of comparing types