Hi I am using Java Optional. I saw that the Optional has a method ifPresent.
Instead of doing something like:
Optional object = someMeth
Quite late but I did following:
String myValue = object.map(x->x.getValue()).orElse(""); //or null. Whatever you want to return.