diff --git a/Framework/Catalog/src/ONCat.cpp b/Framework/Catalog/src/ONCat.cpp
index 7e4f9f8c27f550e004922592b9d1ff60cedc6850..3f8563cc199e60ff20909bcdb2d5598603e61883 100644
--- a/Framework/Catalog/src/ONCat.cpp
+++ b/Framework/Catalog/src/ONCat.cpp
@@ -171,7 +171,7 @@ bool ONCat::isUserLoggedIn() const {
     return false;
   }
 
-  return m_tokenStore->getToken();
+  return m_tokenStore->getToken().is_initialized();
 }
 
 void ONCat::logout() {
@@ -342,7 +342,7 @@ void ONCat::refreshTokenIfNeeded(const DateAndTime &currentTime) {
       throw CatalogError(ie.what());
     }
   } else if (m_flow == OAuthFlow::RESOURCE_OWNER_CREDENTIALS) {
-    if (!currentToken) {
+    if (!currentToken.is_initialized()) {
       return;
     }
     if (!currentToken->isExpired(currentTime)) {