private boolean checkForPointer(Program program, PseudoDisassembler pdis, Address target,
			boolean doit) {
		try {

			if (relocationGuideEnabled && !isValidRelocationAddress(program, target)) {
				return false;
			}

			// get the value in address form of the bytes at address a
			Memory memory = program.getMemory();
			Address testAddr =
				PointerDataType.getAddressValue(new DumbMemBufferImpl(memory, target),
					program.getDefaultPointerSize(), target.getAddressSpace());

			// test that the value isn't 0
			//    May be bad if an address table has a 0 in it, but normally
			//    0 is not found in memory anyway, so better to be conservative
			// not good if pointer is a small number
			//   don't chance it
			if (testAddr == null || (testAddr.getOffset() >= 0 && testAddr.getOffset() < 4096L)) {
				return false;
			}

			// if the address isn't valid for this processors alignment
			if (testAddr.getOffset() % switchTableAlignment != 0) {
				return false;
			}

			// if the reference is not in memory or to a well known location, then don't create it
			// because we are not sure it is correct
			if (!memory.contains(testAddr)) {
				Symbol symbol = program.getSymbolTable().getPrimarySymbol(testAddr);
				if (symbol == null || symbol.getSource() == SourceType.DEFAULT) {
					return false;
				}
			}

			if (desiredDataMemoryContainsReference(program, target, target.getPointerSize())) {
				return false;
			}

			// make sure not offcut
			CodeUnit cu = program.getListing().getCodeUnitContaining(testAddr);
			if (cu != null && !cu.getMinAddress().equals(testAddr)) {
				return false;
			}

			// make sure it isn't into the middle of code
			//   If there is an instruction before this one, it should not fall into it.
			if (cu instanceof Instruction) {
				Instruction instr = (Instruction) cu;
				if (instr.isInDelaySlot()) {
					return false;
				}
				Address fallFrom = instr.getFallFrom();
				if (fallFrom != null) {
					// only consider if function already exists at this instr
					if (program.getFunctionManager().getFunctionAt(instr.getMinAddress()) == null) {
						return false;
					}
				}
				else {
					// don't reference inside the middle of a function
					Function func = program.getFunctionManager().getFunctionContaining(testAddr);
					if (func != null && !func.getEntryPoint().equals(testAddr)) {
						return false;
					}
				}
			}

			// TODO:  Even if this smells like a pointer, we should put it into a constant POOL
			//        for later analysis.
			if (doit && clearAllUndefined(program, target, program.getDefaultPointerSize())) {
				DataType adt =
					program.getDataTypeManager().addDataType(new PointerDataType(), null);
				CreateDataCmd cmd = new CreateDataCmd(target, adt);
				cmd.applyTo(program);
			}
			return true;
		}
		catch (AddressOutOfBoundsException e) {
			return false;
		}
	}
Check if the set of bytes that should be used is all undefined, or all undefined data types.
It means that whatever laid things down here only knew that something was accessed of 
some size.

@param program
@param start
@param lenBytes
@return false if data couldn't be cleared away
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/OperandReferenceAnalyzer.java