vishal-reddy
val map = mapOf("foo" to 1, "bar" to null) val x = map.getOrElse("bar") { null } val y = x ?: throw Exception("bad stuff”)