Issue #16991: Use PyObject_TypeCheck instead of PyObject_IsInstance.
diff --git a/Include/odictobject.h b/Include/odictobject.h
index a32fbc5..1d0d235 100644
--- a/Include/odictobject.h
+++ b/Include/odictobject.h
@@ -19,7 +19,7 @@
 
 #endif /* Py_LIMITED_API */
 
-#define PyODict_Check(op) PyObject_IsInstance(op, (PyObject *)&PyODict_Type)
+#define PyODict_Check(op) PyObject_TypeCheck(op, &PyODict_Type)
 #define PyODict_CheckExact(op) (Py_TYPE(op) == &PyODict_Type)
 #define PyODict_SIZE(op) ((PyDictObject *)op)->ma_used
 #define PyODict_HasKey(od, key) (PyMapping_HasKey(PyObject *)od, key)