Check instance for object instead of checking class name
Removed else part
Merge pull request #16 from newage/hotfix/1.0.2

Checking of instance object instead of checking class name.

Thanks to @newage