So, due to lack of methods like Long.valueOf(String s) I am stuck.
Long.valueOf(String s)
How to convert String to Long in Kotlin?
If you don't want to handle NumberFormatException while parsing
NumberFormatException
var someLongValue=string.toLongOrNull() ?: 0