ast: forbid nulls in list<> type; fix grammar template