code: protected JcrNodeType findTypeInMapOrList( Name typeName,
                                                 Collection<JcrNodeType> pendingList ) {
          for (JcrNodeType pendingNodeType : pendingList) {
              if (pendingNodeType.getInternalName().equals(typeName)) {
                  return pendingNodeType;
              }
          }
  
          return nodeTypes.get(typeName);
      }
docs: Finds the named type in the given collection of types pending registration if it exists, else returns the type definition
  from the repository
  
  @param typeName the name of the type to retrieve
  @param pendingList a collection of types that have passed validation but have not yet been committed to the repository
  @return the node type with the given name from {@code pendingList} if it exists in the collection or from the
  {@link #nodeTypes registered types} if it exists there; may be null