We could alternatively check if `node.loc` responds to `begin`. IMHO it would make the code a bit clearer. That's also a good opportunity to document this class, mentioning in the description that stuff like `__FILE__` and `__DIR__` are created as strings, but don't respond to `begin`.