Add type checking for pass manager arguments

This should fix issue #142
Merge pull request #150 from serge-sans-paille/fix-issue-142

Add type checking for pass manager arguments