How about regex the input instead?
read a
if [[ $a =~ ^[0-9]+$ ]]
then
echo this is a number
else
echo not a number
fi
^
means start of string$
means end of string[0-9]+
means 1 or more occurances of a number=~
is syntax for Bash regular expression