I have the following piece of code:
myList.getJumps().stream()
.map(step -> step.getJump().getValue())
.flatMap(List::stream)
.collect(Collectors.toList());
There is a chance that step.getJump() can be null.
Is there an efficient way to avoid a NPE there?