Do you mean an argument to a bash script? If so this works
if `echo $1 | grep -q [^[:digit:]]`; then
echo $1 is not a number
echo $1 is a number
This tests the first argument ("$1") to a bash script to so if it contains anything but numbers. If so it is not a number.