type(X) is Y ==> isinstance(X, Y)
Merge pull request #14517 from hulu/misc-use-isinstance

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