public boolean isStackVariable(int ordinal) {
		DataTypeComponent stackElement = getDefinedComponentAtOrdinal(ordinal);
		return stackElement != null;
	}
Returns true if a stack variable is defined at the specified ordinal.

@param ordinal stack frame ordinal
@return true if variable is defined at ordinal or false if undefined.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/stackeditor/StackFrameDataType.java