- public Optional<String> apply(Optional<? extends Identified> identified) {
- return identified.isPresent() ? Optional.of(identified.get().getId()) : Optional.<String>absent();
+ public String apply(Identified identified) {
+ return (identified == null) ? null : identified.getId();