Add number digit checker before conversion.

Signed-off-by: Toha <tohenk@yahoo.com>