Modified various passes to use the inspect module instead of using type comparisons or isinstance.