Conditional expressions in Scala