add an `else` which raises a `ValueError`