protected boolean isUndefined(Address address, long addr) {
		if (program.getMemory().contains(address)) {
			try {
				DBRecord rec = dataAdapter.getRecord(addr);
				if (rec == null) {
					rec = instAdapter.getRecord(addr);
				}
				if (rec != null) {
					return false;
				}
				CodeUnit cu = getDefinedBefore(address);
				if (cu == null) {
					return true;
				}
				return cu.getMaxAddress().compareTo(address) < 0;
			}
			catch (IOException e) {
				program.dbError(e);
			}
		}
		return false;
	}
Checks if all the addresses from start to end have undefined data.
@param start the first address in the range to check.
@param end the last address in the range to check.
@return true if all the addresses in the range have undefined data.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/CodeManager.java