Don't think I was casting the getAllValidCommands() right.