discriminated: raise ValueError instead of AssertionError