python check if string is json or not