Actually, let's rewrite the whole function to use `literal_symbol`:

```
try:
    literal_symbol(expr)
    return True
except (AttributeError, ValueError):
    return False
```