Avoid null reference when processing element lookup.
Avoid another null reference.
Build null nodes if selections are empty.

Otherwise, this will propagate an exception.
Use function to build AST node.
Use AddRange instead of ForEach.
MAGN-3613: Line extension broken
Merge branch 'master' into Revit2015
Merge branch 'Revit2015' of github.com:DynamoDS/Dynamo into Revit2015