may make sense to add an `isValid` method to `Trace` instead of having a separate instance