Is it possible to automate printing the variable which is null in a NullReferenceException ?

When getting a NullReferenceException I am always a little angry that unity is not printing which variable actually is null. It happened to me a dozen times that in the line, where the Exception originated from, are about 5 variables that could be null, and it would help a lot if there would be some way to automate the process of getting the null variable.

Thanks in advance.

public void CheckNullLine(GameObject one, GameObject two, GameObject three)
string i1 = “!”; if (one == null) { i1 = “null”; }
string i2 = “!”; if (two == null) { i2 = “null”; }
string i3 = “!”; if (three == null) { i3 = “null”; }
print($“1.{i1} 2.{i2} 3.{i3}”);

You’re welcome :wink: