utils modules: type(X) is Y  ==>  isinstance(X, Y)

Looks like there's been some backsliding. I think I fixed this previously a year ago...