I have two streams of integers guestsTravelWith and guests, which I am concatenating but throwing error when any one of stream is Null. Is there a nullsafe way to concatenate two streams? Or using if conditions is my only hope?
Stream<Integer> guests = code+some_method();
Stream<Integer> guestsTravelWith = code+some_method();
Stream.concat(guestsTravelWith, guests)