Added validation for invalid menu input