I recently found that we can use ?? operator to check nulls. Please check the below code samples:
var res = data ?? new data();
This is
I would have thought the equivalent of
var res = data ?? data.toString();
would be
var res = (data!=null) ? data : data.toString();