Frozensets do not benefit from autoconversion.
diff --git a/Objects/setobject.c b/Objects/setobject.c
index cc2c2ee..b379845 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -1755,7 +1755,7 @@
 
 	rv = set_contains_key(so, key);
 	if (rv == -1) {
-		if (!PyAnySet_Check(key) || !PyErr_ExceptionMatches(PyExc_TypeError))
+		if (!PySet_Check(key) || !PyErr_ExceptionMatches(PyExc_TypeError))
 			return -1;
 		PyErr_Clear();
 		tmpkey = make_new_set(&PyFrozenSet_Type, NULL);
@@ -1790,7 +1790,7 @@
 
 	rv = set_discard_key(so, key);
 	if (rv == -1) {
-		if (!PyAnySet_Check(key) || !PyErr_ExceptionMatches(PyExc_TypeError))
+		if (!PySet_Check(key) || !PyErr_ExceptionMatches(PyExc_TypeError))
 			return NULL;
 		PyErr_Clear();
 		tmpkey = make_new_set(&PyFrozenSet_Type, NULL);
@@ -1821,7 +1821,7 @@
 
 	rv = set_discard_key(so, key);
 	if (rv == -1) {
-		if (!PyAnySet_Check(key) || !PyErr_ExceptionMatches(PyExc_TypeError))
+		if (!PySet_Check(key) || !PyErr_ExceptionMatches(PyExc_TypeError))
 			return NULL;
 		PyErr_Clear();
 		tmpkey = make_new_set(&PyFrozenSet_Type, NULL);