public boolean isFunctionPointer(Address address, boolean allowNullFunctionPointer)
			throws CancelledException {

		// check for or create null pointer if valid number of zeros at address
		if (isNullPointer(address) && allowNullFunctionPointer) {
			return true;
		}

		// check for or create function pointer if valid function pointed to
		Data data = currentProgram.getListing().getDefinedDataAt(address);
		if (data != null) {
			if (data.isPointer() && getReferencedFunction(address) != null) {
				return true;
			}
		}
		else {

			PointerDataType pointerDataType = new PointerDataType();

			try {
				data = createData(address, pointerDataType);
				if (getReferencedFunction(address) != null) {
					return true;
				}
				clearListing(address);
				return false;
			}
			catch (CancelledException e) {
				throw e;
			}
			catch (Exception e) {
				return false;
			}
		}
		return false;

	}
Method to check to see if there is a valid function pointer at the given address. If it is 
valid but not created, create it
@param address the given address
@param allowNullFunctionPointer if true, allow null pointers as a valid function pointer
@return true if it is a function pointer, else returns false
@throws CancelledException if cancelled
Ghidra/Features/Decompiler/ghidra_scripts/classrecovery/ExtendedFlatProgramAPI.java