input: Write a function to modify a given Python function so that it handles errors during file reading and JSON decoding operations. The function should print appropriate error messages when a file is not found or when the file content is not in a valid JSON format.
  
  def read_data_from_json(filename):
      try:
          with open(filename, 'r') as f:
              data = json.load(f)
          return data
      except FileNotFoundError:
          print("The file specified does not exist.")
      except json.decoder.JSONDecodeError:
          print("The file specified is not in a valid JSON format.")
  
  assert read_data_from_json("nonexistent_file.json")==None
  assert read_data_from_json("invalid_json.json")==None
  assert read_data_from_json("valid_file.json")=={"key": "value"}
output: def read_data_from_json(filename):
      try:
          with open(filename, 'r') as f:
              data = json.load(f)
          return data
      except FileNotFoundError:
          print("The file specified does not exist.")
      except json.decoder.JSONDecodeError:
          print("The file specified is not in a valid JSON format.")