input: Write a function to read the contents from a given URL and return the content if the request is successful, otherwise return None. If the URL is invalid or the request fails, the function should return None.
  assert read_url("https://example.com") is not None
  assert read_url("https://nonexistenturl") is None
  assert read_url("") is None
output: import requests
  
  def read_url(url):
      try:
          response = requests.get(url)
          response.raise_for_status()
          return response.text
      except (requests.RequestException, ValueError):
          return None