You should be able to use the NonEmptyList
functionality from Scalaz like so:
import scalaz._
import Scalaz._
val list = List()
val str = list.toNel.map(_.list.mkString(",")).getOrElse("empty")
println(str)
In my example, you would see the word "empty" get printed out. If you changed the list definition to:
val list = List("foo", "bar")
Then you would see "foo,bar" get printed out.