Well, you can always have a Global instance to compare with.
example:
type mytype
...
end type
global nullmytype.mytype
function dostuff(param1.mytype, param2.mytype = nullmytype)
if param2 = nullmytype then
... you have it when its null
end function
Remedied with Handle()...
type mytype ... end type global nullmytype.mytype function dostuff(param1.mytype, param2.mytype = nullmytype) if Handle(param2) = Handle(nullmytype) then ... you have it when its null end function
It should work.