bpo-39573: Use Py_TYPE() macro in Objects directory (GH-18392)

Replace direct access to PyObject.ob_type with Py_TYPE().
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index ae6b50f..164104e 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -4015,7 +4015,7 @@
         /* XXX Get rid of this restriction later */
         PyErr_Format(PyExc_TypeError,
                      "%s() requires a dict argument, not '%s'",
-                     type->tp_name, dict->ob_type->tp_name);
+                     type->tp_name, Py_TYPE(dict)->tp_name);
         return NULL;
     }
     dv = PyObject_GC_New(_PyDictViewObject, type);