I would like to prevent further processing on an object if it is null.
In the following code I check if the object is null by either:
if (!data.Equal
in C# > 7.0 use
if (obj is null) ...
if (obj is null)
This will ignore any == or != defined by the object (unless of course you want to use them ...)
==
!=
For not null use if (obj is object) and from C# 9 you can also use if (obj is not null)
if (obj is object)
if (obj is not null)