public static boolean isValidForFunction(Program program, Address functionAddress) {
		if (functionAddress == null) {
			throw new IllegalArgumentException("functionAddress cannot be null.");
		}
		if (!isValidAddress(program, functionAddress)) {
			return false;
		}
		Listing listing = program.getListing();
		// Should be instruction or undefined data.
		return (listing.getInstructionAt(functionAddress) != null) ||
			(listing.getUndefinedDataAt(functionAddress) != null);
	}
Checks to determine if the address in the indicated program exists in memory and
could possibly be used for creating a function. It is expected to have undefined data
or an instruction at the address.
@param program the program to check.
@param functionAddress the address to check.
@return true if it appears to  be a valid (very loosely defined) location for a function.
Ghidra/Features/MicrosoftCodeAnalyzer/src/main/java/ghidra/app/cmd/data/EHDataTypeUtilities.java