Ah - bad re-factoring - it now reads:

```scala
    def addHeaderIfValue(name: String, maybeValue: Option[String], response: Result): Result = {
      maybeValue.map(v => response.withHeaders(name -> v)).getOrElse(response)
    }
```