Couldn't you just use your new function as:

```
if not is_literal(literal):
    raise ValueError
elif literal.is_Symbol:
    return literal
return literal.args[0]
```

But this seems overkill since `is_literal` is not currently used elsewhere. I would just stick with

```
if literal.is_Symbol:
    return literal
elif literal.is_Not and len(literal.args) == 1:
    return literal(literal.args[0])
else:
    raise ValueError
```