To really be consistent we would need a 
$tw.utils.getAttributeValueFromParseTreeNode(node, name).

Do you want that? I can do it. That function could then do all the pretests.