private DataType typeIsUnionRelated(Varnode vn) {
		if (vn == null) {
			return null;
		}
		HighVariable high = vn.getHigh();
		if (high == null) {
			return null;
		}
		DataType dt = high.getDataType();
		if (dt instanceof TypeDef) {
			dt = ((TypeDef) dt).getBaseDataType();
		}
		DataType innerType = dt;
		if (innerType instanceof Pointer) {
			innerType = ((Pointer) innerType).getDataType();
		}
		else if (innerType instanceof PartialUnion) {
			innerType = ((PartialUnion) innerType).getParent();
			if (innerType instanceof TypeDef) {
				innerType = ((TypeDef) innerType).getBaseDataType();
			}
		}
		if (innerType == unionDt) {
			return dt;
		}
		// Its possible the varnode is a truncated symbol
		HighSymbol symbol = high.getSymbol();
		if (symbol == null) {
			return null;
		}
		dt = symbol.getDataType();
		if (dt instanceof TypeDef) {
			dt = ((TypeDef) dt).getBaseDataType();
		}
		return (dt == unionDt) ? dt : null;
	}
Determine if the data-type of the given Varnode is related to the union -unionDt-
The Varnode's data-type may be a typedef of, a pointer to, or a truncated form of
the union.  If so the Varnode's data-type is returned, otherwise null is returned.
@param vn is the given Varnode
@return the data-type of the Varnode (if it is related to the union) or null
Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/ForceUnionAction.java