Guava has a very powerful searching capabilities when it comes to such type of problems. For example, if your area searching an object based on one of it properties you may consider:
Iterables.tryFind(listOfCats, new Predicate(){
@Override
boolean apply(@Nullable Cat input) {
return "tom".equalsIgnoreCase(input.name());
}
}).or(new Cat("Tom"));
in case it's possible that the Tom cat is not in the listOfCats, it will be returned, thus allowing you to avoid NPE.