code: private static ValueMap getPagePropertiesNullSafe(Page page) {
      if (page != null) {
        return page.getProperties();
      }
      else {
        return ValueMap.EMPTY;
      }
    }
docs: Get valuemap/papge properties of current page.
  @param page Page
  @return Value map of current page or empty map if current page is null.