List<String> (@Nullable List<?> list) { if (list == null) return null; // fix serialization issue if 's' is an instance of groovy.lang.GString [IDEA-125174] //noinspection SSBasedInspection return list.stream().map(x -> x.toString()).collect(Collectors.toList()); }