Add checks to AST constructors. Allow null for empty lists.
Merge branch 'master' into junit