public static void checkValidRange(Address start, Address end) {
		if (start == null || end == null) {
			throw new IllegalArgumentException("Null start or end address was specified");
		}
		if (!start.getAddressSpace().equals(end.getAddressSpace())) {
			throw new IllegalArgumentException(
				"Start and end addresses must be in same address space!  Start " + start +
					"   end = " + end);
		}
		if (start.compareTo(end) > 0) {
			throw new IllegalArgumentException("Start address must be less than or equal to " +
				"end address:  Start " + start + "   end = " + end);
		}
	}
Change the specified start and end addresses to see if they form a valid
range within the same {@link AddressSpace}.
@param start range start address
@param end range end address
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/address/AddressRange.java