By validating input first, this method can be simplified a bit, something along the lines of:-
```java
        public KeyPhrase apply(org.atlasapi.media.entity.simple.KeyPhrase input) {
                Preconditions.checkState(input.getPublisher() == null || input.getPublisher() == contentPublisher, 
                        "Publisher in key phrase must match publisher for content");
                
                PublisherDetails publisherDetails = Objects.firstNonNull(input.getPublisher(), contentPublisher);
                Maybe<Publisher> publisher = Publisher.fromKey(publisherDetails.getKey());
                
                if(!publisher.hasValue()) {
                    throw new IllegalArgumentException(String.format("No publisher for %s", publisherDetails.getKey()));
                }
                
                return new KeyPhrase(input.getPhrase(), publisher.requireValue(), input.getWeighting());
            }
```

(Note I also changed the signature of keyPhrases to pass in PublisherDetails rather than a Publisher, since it made for simpler code)