diff --git a/vm/vmExpr.go b/vm/vmExpr.go
index <HASH>..<HASH> 100644
--- a/vm/vmExpr.go
+++ b/vm/vmExpr.go
@@ -844,6 +844,9 @@ func invokeExpr(expr ast.Expr, env *Env) (reflect.Value, error) {
 		if err != nil {
 			return NilValue, NewError(expr, err)
 		}
+		if rt == nil {
+			return NilValue, NewStringError(expr, fmt.Sprintf("invalid type for make"))
+		}
 		if rt.Kind() == reflect.Map {
 			return reflect.MakeMap(reflect.MapOf(rt.Key(), rt.Elem())).Convert(rt), nil
 		}
Updated MakeExpr, added nil type check