checks whether the inputted string is a JSON. Returns true if it is a JSON and returns false if it isn't