Mani
11/06/2019, 10:07 AMval pickableState = try {
            PickableState.valueOf(state)
        } catch (ex: Exception){
            null
        }Matteo Mirk
11/20/2019, 12:12 PMinline fun <reified E : Enum<E>> enumValueOrNull(name: String): E? = try {
    enumValueOf<E>(name)
} catch (e: Exception) {
    null
}