Bash Shell Script Check If Variable Is Array And List