how do i check if a string is valid json in python?,print(json.dumps(foo))