diff --git a/portal/model/Uuid.py b/portal/model/Uuid.py
index 5eb2a46668316c38a7c866e92e11d7269bae3c7a..452b477c43486cd69e02d15b0b3512e32da9f584 100644
--- a/portal/model/Uuid.py
+++ b/portal/model/Uuid.py
@@ -26,12 +26,12 @@ class Uuid(types.TypeDecorator):
     def load_dialect_impl(self, dialect: Dialect) -> types.TypeEngine[Any]:
         return types.String(UUID_LENGTH)
 
-    def process_bind_param(self, value: str | UUID, dialect: Dialect) -> Optional[str]:
+    def process_bind_param(self, value: Any | None, dialect: Dialect) -> Optional[str]:
         if isinstance(value, str):
             # Manually create UUID from string, to raise an error if the string is malformed
             UUID(value)
 
-        return str(value) if value else None
+        return str(value) if isinstance(value, UUID) else None
 
     def process_result_value(
         self, value: Optional[str], dialect: Dialect