Check if the given string is valid JSON