#9018: os.path.normcase() now raises a TypeError if the argument is not str or bytes.
diff --git a/Lib/macpath.py b/Lib/macpath.py
index 3b3e4ff..4ab7c09 100644
--- a/Lib/macpath.py
+++ b/Lib/macpath.py
@@ -32,6 +32,9 @@
 # Normalize the case of a pathname.  Dummy in Posix, but <s>.lower() here.
 
 def normcase(path):
+    if not isinstance(path, (bytes, str)):
+        raise TypeError("normcase() argument must be str or bytes, "
+                        "not '{}'".format(path.__class__.__name__))
     return path.lower()