@Override
  @WorkerThread
  @NonNull
  public List<String> getProvidersForEmail(@Nullable String emailAddress) {
    if (emailAddress == null) {
      return Collections.emptyList();
    }

    ProviderQueryResult result = await(mFirebaseAuth.fetchProvidersForEmail(emailAddress));
    if (hasProviders(result)) {
      return result.getProviders();
    }

    return Collections.emptyList();
  }
 private boolean hasProviders(@Nullable ProviderQueryResult result) {
   return result != null && result.getProviders() != null && result.getProviders().size() > 0;
 }