bpo-39573: Clean up modules and headers to use Py_IS_TYPE() function (GH-18521)

diff --git a/Modules/xxmodule.c b/Modules/xxmodule.c
index 0250031..17b049c 100644
--- a/Modules/xxmodule.c
+++ b/Modules/xxmodule.c
@@ -25,7 +25,7 @@
 
 static PyTypeObject Xxo_Type;
 
-#define XxoObject_Check(v)      (Py_TYPE(v) == &Xxo_Type)
+#define XxoObject_Check(v)      Py_IS_TYPE(v, &Xxo_Type)
 
 static XxoObject *
 newXxoObject(PyObject *arg)