Iterable<Trace> get traces { if (this is Trace) return [this as Trace]; if (this is Traces) return (this as Traces).traces; throw StateError('$runtimeType is neither Trace nor Traces.'); }