input: Write a function to parse a json-formatted string into a dictionary. If the input string is not a valid json string, return None. The function should use the built-in json module in Python.
  
  assert test_function('{"name": "John","age": 30,"address": {"city": "New York","state": "NY"}}') == {"name": "John","age": 30,"address": {"city": "New York","state": "NY"}}
  assert test_function('{"name": "John", "age": 30 "address": {"city": "New York","state": "NY"}}') is None
  assert test_function('{"name": "Alice","age": 25}') == {"name": "Alice","age": 25}
  assert test_function('{"name": "Bob", "age": -30}') == {"name": "Bob", "age": -30}
  assert test_function('') is None
output: try:
      import json
      return json.loads(s)
  except json.JSONDecodeError:
      return None