code: public @Nullable Resource getResource(@Nullable Predicate<Resource> filter, @Nullable Resource baseResource) {
      List<Resource> suffixResources = getResources(filter, baseResource);
      if (suffixResources.isEmpty()) {
        return null;
      }
      else {
        return suffixResources.get(0);
      }
    }
docs: Get the first item returned by {@link #getResources(Predicate, Resource)} or null if list is empty
  @param filter the resource filter
  @param baseResource the suffix path is relative to this resource path (null for current page's jcr:content node)
  @return the first {@link Resource} or null