check argument string type bash code example
Example 1: check if variable is a number in bash
re='^[0-9]+$'
if ! [[ $yournumber =~ $re ]] ; then
echo "error: Not a number" >&2; exit 1
fi
Example 2: bash compare two strings
if [ "$s1" == "$s2" ]
then
stuff
fi