use isinstance(X, Y) instead of 'type(X) is Y'

Last batch I came across randomly. This batch I grep'd for.