code: public String getStartGallery(String galleryType, CmsObject cms) {
  
          String startGallerySetting = getStartGallery(galleryType);
          String pathSetting = null;
          // if a custom path to the gallery is selected
          if ((startGallerySetting != null) && !startGallerySetting.equals(CmsWorkplace.INPUT_NONE)) {
              String sitePath = cms.getRequestContext().removeSiteRoot(startGallerySetting);
              if (cms.existsResource(sitePath)) {
                  pathSetting = startGallerySetting;
              } else {
                  pathSetting = CmsWorkplace.INPUT_DEFAULT;
              }
              // global default settings
          } else if (startGallerySetting == null) {
              pathSetting = CmsWorkplace.INPUT_DEFAULT;
          }
          return pathSetting;
  
      }
docs: Returns the root site path to the start gallery of the user or the constant CmsPreferences.INPUT_DEFAULT.<p>
  
  @param galleryType the type of the gallery
  @param cms Cms object
  @return the root site path to the start gallery or the default key, null if "not set"