CommandParser: Implicitely check command validity in getCommand()

Remove check() method, since the validation is now done automatically.
CommandParser.peekCommand() can be used to just look at the command
portion of the input, without validation. Also update tests.