Object type comparisons should be done with `isinstance` according to pep8.