Guard against TypeError in atexit handlers
diff --git a/concurrent/futures/process.py b/concurrent/futures/process.py
index ee463f1..665da8e 100644
--- a/concurrent/futures/process.py
+++ b/concurrent/futures/process.py
@@ -73,7 +73,7 @@
 def _python_exit():
     global _shutdown
     _shutdown = True
-    items = list(_threads_queues.items())
+    items = list(_threads_queues.items()) if _threads_queues else ()
     for t, q in items:
         q.put(None)
     for t, q in items:
diff --git a/concurrent/futures/thread.py b/concurrent/futures/thread.py
index fa5ed0c..cee65d0 100644
--- a/concurrent/futures/thread.py
+++ b/concurrent/futures/thread.py
@@ -32,7 +32,7 @@
 def _python_exit():
     global _shutdown
     _shutdown = True
-    items = list(_threads_queues.items())
+    items = list(_threads_queues.items()) if _threads_queues else ()
     for t, q in items:
         q.put(None)
     for t, q in items: