input: from typing import List, Optional
  
  def get_top_articles(url: str, max_articles: int = 10) -> Optional[List[str]]:
      """
      This web scraper retrieves the most recent articles from a specified news website URL.
      It returns a list of text content from the top 'max_articles' articles. If no articles
      are found or if the URL is invalid, it returns None.
      
      Example:
      >>> get_top_articles('http://example.com/news', max_articles=5)
      ['Article 1 text', 'Article 2 text', 'Article 3 text', 'Article 4 text', 'Article 5 text']
      """
output:     import requests
      from bs4 import BeautifulSoup
  
      try:
          response = requests.get(url)
          response.raise_for_status()
      except requests.RequestException:
          return None
  
      soup = BeautifulSoup(response.text, 'html.parser')
      articles = soup.find_all('article')
  
      if not articles:
          return None
  
      top_articles = []
      for article in articles[:max_articles]:
          text = article.get_text(strip=True)
          if text:
              top_articles.append(text)
  
      return top_articles if top_articles else None