diff --git a/allgo/__init__.py b/allgo/__init__.py
index 935a2145bd586e45cae845262d1d5342f5118a1f..eef4f3fa197b9026f342d4604732c31a048df7cd 100644
--- a/allgo/__init__.py
+++ b/allgo/__init__.py
@@ -151,7 +151,7 @@ class Init:
         # Check all methods
         # notebook, local_file, env_variable, arg_variable
         if(API_parameters['auth_method'] == 'notebook'):
-            if (API_parameters.get('API_token') = none):
+            if (not API_parameters.get('API_token')):
                 API_parameters['API_token'] = secrets.token_hex(16)
                 print('Notebook token created')
             elif(API_token_valid):