Create safe downcast from String to Number

I am not sure about `toInt` part to parse String and usage of `scala.util.Try`