Added a check for an overflow to String::toInt().