pkg state: type(X) is Y ==> isinstance(X, Y)
Merge pull request #14528 from hulu/use-isinstance-pkg

pkg state: type(X) is Y ==> isinstance(X, Y)