ast: Fix ArrayVariableDef assertion to allow for none types
ast: rename attr to method
ast: Add comments and docstrings to ast mapper