public static Structure getStructureForExtending(DataType dt) {
		if (dt instanceof TypeDef) {
			dt = ((TypeDef) dt).getBaseDataType();
		}
		if (dt instanceof Pointer) {
			dt = ((Pointer) dt).getDataType();
		}
		else {
			return null;
		}
		if (dt instanceof TypeDef) {
			dt = ((TypeDef) dt).getBaseDataType();
		}
		if (dt instanceof Structure) {
			return (Structure) dt;
		}
		return null;
	}
Check if a variable has a data-type that is suitable for being extended.
If so return the structure data-type, otherwise return null.
Modulo typedefs, the data-type of the variable must be exactly a
"pointer to a structure".  Not a "structure" itself, or a
"pointer to a pointer to ... a structure".
@param dt is the data-type of the variable to test
@return the extendable structure data-type or null
Ghidra/Features/Decompiler/src/main/java/ghidra/app/decompiler/util/FillOutStructureHelper.java