I think a match is better here:
```scala
(a, b) match {
  case (Some(qa), Some(qb)) => Some(mergeWithPeer(qa, qb))
  case (None, _) => b
  case (_, None) => a
}
```