diff --git a/lib/import_user.py b/lib/import_user.py
index 9369a122f9736c01d9e22a7c5234612562d6cb20..7ab934c13edf2a40ff4044d4be1a61b77601b849 100644
--- a/lib/import_user.py
+++ b/lib/import_user.py
@@ -29,6 +29,10 @@ class ImportUser:
         # validation run
         error_count = 0
         for _, person in persons.iterrows():
+            if (not isinstance(person['username'], str)):
+                logging.error(f"- missing username in '{person}'")
+                error_count+=1
+                continue
             if (not bool(re.match('^[\w\d\.-]+$', person['username'], flags=re.IGNORECASE))):
                 logging.error(f"- found invalid characters in username: '{person['username']}'")
                 error_count+=1