Handle ValueErrors while validating command context.