code: public static boolean is(@NotNull Page page, @NotNull String @NotNull... templatePaths) {
      if (page == null || templatePaths == null || templatePaths.length == 0) {
        return false;
      }
      String templatePath = page.getProperties().get(NameConstants.PN_TEMPLATE, String.class);
      for (String givenTemplatePath : templatePaths) {
        if (StringUtils.equals(templatePath, givenTemplatePath)) {
          return true;
        }
      }
      return false;
    }
docs: Checks if the given page uses a specific template.
  @param page AEM page
  @param templatePaths Template path(s)
  @return true if the page uses the template