public Object invoke(Object target, Object... args) {
        // no-op if failed to load method in constructor or target is null
        if (cachedMethod == null || target == null) {
            return null;
        }
        try {
            return cachedMethod.invoke(target, args);
        } catch (IllegalAccessException ignored) {
            // Ignored
        } catch (InvocationTargetException ignored) {
            // Ignored
        }
        return null;
    }
Instantiates a new OptionalMethod.
<p>Does not throw any exceptions if the class or method can't be loaded, or if any parameter
classes are {@code null} and instead behaves as a no-op, always returning {@code null}.

@param clazz the Class to search for methods on
@param methodName the name of the {@code Method} on {@code clazz}
@param methodParams list of {@code Classes} of the {@code Method's} parameters

@throws NullPointerException if the method name is {@code null}
common/src/main/java/org/conscrypt/metrics/OptionalMethod.java