diff --git a/ldapdomaindump/__init__.py b/ldapdomaindump/__init__.py
index <HASH>..<HASH> 100644
--- a/ldapdomaindump/__init__.py
+++ b/ldapdomaindump/__init__.py
@@ -457,7 +457,7 @@ class reportWriter(object):
         if attr is None:

             return outflags

         for flag, val in iteritems(flags_def):

-            if attr.value & val:

+            if attr.value != None and attr.value & val:

                 outflags.append(flag)

         return outflags
#<I> Skip flags whose attribute values are of None