validate termType not null and some minor changes