Add type checking for pass manager arguments

This should fix issue #142