code: public static ResolvedType replaceIfMoreSpecific(ResolvedType replacement, ResolvedType defaultValue) {
      ResolvedType toReturn = defaultIfAbsent(replacement, defaultValue);
      if (isObject(replacement) && isNotObject(defaultValue)) {
        return defaultValue;
      }
      return toReturn;
    }
docs: Coalesces the resolved type. Preservers the default value if the replacement is either null or represents
  a type that is less specific than the default value. For e.g. if default value represents a String then
  the replacement value has to be any value that is a subclass of Object. If it represents Object.class then
  the default value is preferred
  
  @param replacement  - replacement value
  @param defaultValue - default value
  @return most specific resolved type