additional error-checking for syntax-tree constructors