Debug type check function, fixes #96
Merge pull request #97 from keenlabs/hotfix/typecheck

Debug type check function