To mee it sounds alot like you are trying to code your way out of a problem which is placed 20" in front of the screen
I had to check. In my case, the problem is more like 24" in front of the screen.
One of the things I hate about C# is the insistence that pointers don't exist, when everything is a pointer, and the fact that you can't implicitly compare a pointer (object) to null. You must explicitly use "!= null".
There are, posted regularly on this forum, attempts to return pointers to memory that goes out of scope when a function ends, and plenty of attempts to pretend that pointers and arrays are complete interchangeable.
It is good that OP is at least aware that some checking of pointers IS useful, even if the examples, so far, are not all that good.