validation for valtype and seqtype, but untested