docs: public static Credentials checkValidForProvider(Credentials creds,
                                                    denominator.Provider provider) {
      checkNotNull(provider, "provider cannot be null");
      if (isAnonymous(creds) && provider.credentialTypeToParameterNames().isEmpty()) {
        return AnonymousCredentials.INSTANCE;
      } else if (creds instanceof Map) {
        // check Map first as clojure Map implements List Map.Entry
        if (credentialConfigurationHasKeys(provider, Map.class.cast(creds).keySet())) {
          return creds;
        }
      } else if (creds instanceof List) {
        if (credentialConfigurationHasPartCount(provider, List.class.cast(creds).size())) {
          return creds;
        }
      }
      throw new IllegalArgumentException(exceptionMessage(creds, provider));
    }