diff --git a/src/gboml/ast/check.py b/src/gboml/ast/check.py
index 143562b186b2acf3f347db8341721d6de49aba67..4003fd84f7d9ad149e246d28e54ad46189424d29 100644
--- a/src/gboml/ast/check.py
+++ b/src/gboml/ast/check.py
@@ -16,9 +16,9 @@ def _check_type(value, typ):
     if isinstance(typ, typing.ForwardRef):
         typ = eval(typ.__forward_arg__)
 
-    if isinstance(typ, types.GenericAlias) and typ.__origin__ == list:
+    if isinstance(typ, types.GenericAlias) and typ.__origin__ in [list, set]:
         subtyp = typing.get_args(typ)[0]
-        if not isinstance(value, list):
+        if not isinstance(value, typ.__origin__):
             raise NotOfType(f"{value} is not an instance of {typ}")
         for x in value:
             _check_type(x, subtyp)