``` val remoteInput = Some("blue") .flatMa...
# arrow
s
Copy code
val remoteInput = Some("blue")
        .flatMap { if(it.isNullOrBlank()) None else Some(it.trim()) }
        .map { it.toLowerCase() }
    println(remoteInput)
    val vi = remoteInput.toEither { Exception("No valid input") }