code: private boolean checkApiKey(final MapType mapTypeToCheck) {
          switch (requireNonNull(mapTypeToCheck)) {
              case BINGMAPS_ROAD:
              case BINGMAPS_AERIAL:
                  return bingMapsApiKey.isPresent();
              default:
                  return true;
          }
      }
docs: checks if the given map type needs an api key, and if so, if it is set.
  
  @param mapTypeToCheck
  the map type
  @return true if either the map type does not need an api key or an api key was set.