Just use an array to contain the list of valid commands.