Refactor Arrays.some()