private void clearUndefinedDataType(Address address, TaskMonitor monitor)
			throws CancelledException {

		Listing listing = currentProgram.getListing();
		Data data = listing.getDefinedDataAt(address);
		if (data == null) {
			return;
		}

		DataType dt = data.getDataType();
		if (Undefined.isUndefined(dt)) {
			listing.clearCodeUnits(address, address, false, monitor);
		}
	}
This will return true if enough pushes before top of function.
This will return false if not enough pushes or if not a function.
Ghidra/Features/MicrosoftCodeAnalyzer/src/main/java/ghidra/app/plugin/prototype/MicrosoftCodeAnalyzerPlugin/PropagateExternalParametersAnalyzer.java