Better checking of content type json