String checkAndFormatDigits(String digits) { digits = digitToEnglish(digits); if (int.tryParse(digits) == null) { throw Exception('input should only contain `int` value.'); } return digits; }