ServerItem (@Nullable String serverName) { return myServerListModel.getItems().stream() .filter(Objects::nonNull) .filter(item -> !(item instanceof TransientItem)) .filter(item -> Objects.equals(item.getServerName(), serverName)) .findAny().orElse(null); }