diff --git a/src/linkahead/common/models.py b/src/linkahead/common/models.py
index e23786edb846b5356ab09772af5e96a49eb6f2b3..eca43ed49256c370cb075446e86490b6979b3225 100644
--- a/src/linkahead/common/models.py
+++ b/src/linkahead/common/models.py
@@ -2522,8 +2522,8 @@ class PropertyList(list):
 
         return xml2str(xml)
 
-    def filter(self, prop: Property = None, pid: Union[str, int] = None,
-               name: str = None, check_wrapped: bool = True) -> list:
+    def filter(self, prop: Optional[Property] = None, pid: Union[None, str, int] = None,
+               name: Optional[str] = None, check_wrapped: bool = True) -> list:
         """
         Return all Properties from the given PropertyList that match the
         selection criteria.
@@ -2693,8 +2693,8 @@ class ParentList(list):
 
         return xml2str(xml)
 
-    def filter(self, parent: Parent = None, pid: Union[str, int] = None,
-               name: str = None, check_wrapped: bool = True) -> list:
+    def filter(self, parent: Optional[Parent] = None, pid: Union[None, str, int] = None,
+               name: Optional[str] = None, check_wrapped: bool = True) -> list:
         """
         Return all Parents from the given ParentList that match the selection
         criteria.
@@ -5498,14 +5498,14 @@ def delete(ids: Union[list[int], range], raise_exception_on_error: bool = True):
     return c.delete(raise_exception_on_error=raise_exception_on_error)
 
 
-def _filter_entity_list(listobject, entity: Entity = None, pid: Union[str, int] = None,
-                        name: str = None, check_wrapped: bool = True) -> list:
+def _filter_entity_list(listobject, entity: Optional[Entity] = None, pid: Union[None, str, int] = None,
+                        name: Optional[str] = None, check_wrapped: bool = True) -> list:
     """
     Return all elements from the given list that match the selection criteria.
 
     You can provide name or ID and all matching elements will be returned.
     If both name and ID are given, elements matching either criterion will be
-    returned. 
+    returned.
 
     If an Entity is given, neither name nor ID may be set. In this case, only
     elements matching both name and ID of the Entity are returned, as long as