code: public static void assertNodeTypeExists(final Session session, final String nodeTypeName)
              throws RepositoryException {
  
          final NodeTypeManager ntm = session.getWorkspace().getNodeTypeManager();
          assertTrue("NodeType " + nodeTypeName + " does not exist", ntm.hasNodeType(nodeTypeName));
      }
docs: Asserts that a specific node type is registered in the workspace of the session.
  
  @param session
  the session to perform the lookup
  @param nodeTypeName
  the name of the nodetype that is asserted to exist
  @throws RepositoryException
  if an error occurs