Use is None rather than general boolean
diff --git a/Lib/compileall.py b/Lib/compileall.py
index 8110fb9..2fbc2bc 100644
--- a/Lib/compileall.py
+++ b/Lib/compileall.py
@@ -44,11 +44,11 @@
     success = 1
     for name in names:
         fullname = os.path.join(dir, name)
-        if ddir:
+        if ddir is not None:
             dfile = os.path.join(ddir, name)
         else:
             dfile = None
-        if rx:
+        if rx is not None:
             mo = rx.search(fullname)
             if mo:
                 continue