[Truffle] Simplified and consolidated a nil object guard.