code: private @NotNull Optional<List<TypeConversion>> resolveConversions(@NotNull NamedTypeList sourceTypes, @NotNull List<Type> targetTypes) {
          if (targetTypes.size() != sourceTypes.size())
              return Optional.empty();
  
          ArrayList<TypeConversion> conversions = new ArrayList<>(targetTypes.size());
  
          for (int i = 0, len = targetTypes.size(); i < len; i++) {
              TypeConversion conversion = findConversionFromDbValue(sourceTypes.getType(i), targetTypes.get(i)).orElse(null);
              if (conversion != null)
                  conversions.add(conversion);
              else
                  return Optional.empty();
          }
  
          return Optional.of(conversions);
      }
docs: Returns the list of conversions that need to be performed to convert sourceTypes
  to targetTypes, or empty if conversions can't be done.