Guard against invalid traces