String (@NotNull Object element) { Object o = invokeNameValueMethod(element); if (o == null || o instanceof String) return (String)o; if (o instanceof GenericValue gv) { final String s = gv.getStringValue(); if (s == null) { final Object value = gv.getValue(); if (value != null) { return String.valueOf(value); } } return s; } return null; }