How to check if an attribute is present in Gatling/Scala
Properly read the documentation: ${tc.exists()}
.
Gatling provides an exists()
built-in EL function (see Galting EL documentation), so a succincter solution would be:
.doIf("${tc.exists()}") {
...
}