Combine these two? I.e.
```
if (input.getDeprecated().isPresent() && input.getDeprecated().get().getState().isPresent()) {
  ...
}
```
?