code: public static String getCanonicalName(final Object object, final String valueIfNull) {
          if (object == null) {
              return valueIfNull;
          }
          final String canonicalName = object.getClass().getCanonicalName();
          return canonicalName == null ? valueIfNull : canonicalName;
      }
docs: <p>Gets the canonical name for an {@code Object}.</p>
  
  @param object the object for which to get the canonical class name; may be null
  @param valueIfNull  the return value if null
  @return the canonical name of the object or {@code valueIfNull}
  @since 3.7
  @see Class#getCanonicalName()