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
I just followed a method that we would usually follow in java script. To convert object to string and then check whether they are null.
var obj = new Object(); var objStr = obj.ToString(); if (!string.IsNullOrEmpty(objStr)){ // code as per your needs }