(define impc:ti:get-closure-or-nativefunc-type
(lambda (closure-or-nativefunc-name)
(let ((res (impc:ti:get-closure-type closure-or-nativefunc-name))) ;; can be #f or NIL :(
(if (or (not res) (null? res)) ;; if not a closure must be native!
(impc:ti:get-nativefunc-type closure-or-nativefunc-name)
res))))