string typeName = (thisNode!=null)?thisNode.GetType().ToString():"undefined"; Debug.Log("# '"+currentLineNumber+"' thisNode '"+thisNode+"' typeName '"+typeName+"'"); the above code returns: # '2' thisNode ' thisId: -41942' typeName 'undefined'