fix isinstance check
Merge pull request #345 from Incubaid/fix-isinstance-check

fix isinstance check