Fix the CommandException use path in ValidInput class