transform/variance

Added variance checking.
why widen only `treeElem`?