I would do:
Function MyFunction(t.mytype)
if t <> null
;do stuff with t
endif
end functionIn other words - error checking, yes. Pointless error messages that ultimately nobody will see, no.
Also, nothing after RuntimeError will get executed, so the Return is redundant in this case.