public static StringDataInstance getStringDataInstance(Data data) {
		if (data == null) {
			return NULL_INSTANCE;
		}
		DataType dt = data.getBaseDataType();
		if (dt instanceof AbstractStringDataType asdt) {
			return asdt.getStringDataInstance(data, data, data.getLength());
		}
		if (dt instanceof Array arrayDt && data.isInitializedMemory()) {
			ArrayStringable arrayStringable =
				ArrayStringable.getArrayStringable(arrayDt.getDataType());
			if (arrayStringable != null && arrayStringable.hasStringValue(data)) {
				return new StringDataInstance(arrayStringable, data, data, data.getLength(), true);
			}
		}
		return NULL_INSTANCE;

	}
Returns a new {@link StringDataInstance} using the bytes in the data codeunit.

@param data {@link Data} item
@return new {@link StringDataInstance}, never NULL. See {@link #NULL_INSTANCE}.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/StringDataInstance.java