(define impc:ti:null-check
(lambda (ast vars kts request?)
;; (println 'null-check 'ast: ast 'request? request?)
(let ((res (if (and (symbol? request?)
(string-contains? (symbol->string request?) "##"))
(if (assoc-strcmp request? vars)
(if (null? (cdr (assoc-strcmp request? vars)))
request?
(cdr (assoc-strcmp request? vars))))
(if (and request?
(impc:ir:pointer? request?))
(list request?)
'())))) ;; forcing to i8* causes problems for generics
;(list (+ *impc:ir:pointer* *impc:ir:si8*))))))
res)))