Nowhere else in the AST classes assert on these kinds of accessors.
This way, we can call the accessors and check the validity of the result
instead of externally duplicating the conditions. This generality will
make it possible to introspect instances for source locations:
http://ec2-18-191-7-3.us-east-2.compute.amazonaws.com:10240/z/iiaWhw
Formatting is incorrect here and elsewhere -- you should run the patch through clang-format.