Added method to response to check whether the response is valid