Sometimes I used to pass pointers to records, so I could test them with nil like this:

procedure doSomething(aRec: PRec);
begin

if aRec = nil then
begin
// the record is not present, do something in this case
end else
begin
// the record is present, use it!
end;

end;

But now in .NET pointers to records are unsafe. I want to produce safe code only. What can I do instead? :?