Boolean (@NotNull String word) { if (dictionaries == null) { return null; // still ("WORD_OF_ENTIRELY_UNKNOWN_LETTERS_FOR_ALL"); } int errors = 0; for (Dictionary dictionary : dictionaries) { Boolean contains = dictionary.contains(word); if (contains == null) { errors++; } else if (contains) { return true; } } if (errors == dictionaries.size()) return null;//("WORD_OF_ENTIRELY_UNKNOWN_LETTERS_FOR_ALL"); return false; }