Andreas Sinz
return first.takeIf { it.isPresent }?.let { Optional.ofNullable(req.header).flatMap {.. } }