diff --git a/src/language/BuiltinFunctionEmbedder.hpp b/src/language/BuiltinFunctionEmbedder.hpp
index ae20b1daa8d9be19ef99d876f3d452d6c6addf1a..a0fd2514dea37e498c22f7276e6781cfffcd230f 100644
--- a/src/language/BuiltinFunctionEmbedder.hpp
+++ b/src/language/BuiltinFunctionEmbedder.hpp
@@ -74,10 +74,14 @@ class BuiltinFunctionEmbedder : public IBuiltinFunctionEmbedder
           } else {
             throw std::runtime_error("unexpected argument types while casting: expecting EmbeddedData");
           }
-        } else if constexpr (std::is_same_v<Ti_Type, FunctionId> and std::is_same_v<Vi_Type, uint64_t>) {
-          std::get<I>(t) = FunctionId{v_i};
-          throw std::runtime_error(
-            "WIP: should get better descriptor, FunctionId should at least refer to the symbol table.");
+        } else if constexpr (std::is_same_v<Ti_Type, FunctionId>) {
+          if constexpr (std::is_same_v<Vi_Type, uint64_t>) {
+            std::get<I>(t) = FunctionId{v_i};
+            throw std::runtime_error(
+              "WIP: should get better descriptor, FunctionId should at least refer to the symbol table.");
+          } else {
+            throw std::runtime_error("unexpected argument types while casting: expecting uint64");
+          }
         } else {
           std::ostringstream os;
           os << "unexpected argument types while casting " << demangle<Vi_Type>() << " -> " << demangle<Ti_Type>()