pub fn to_long(arg: &Value) -> Result<i64, String>
Convert arg to a long and do some error checks (without casting)