Set content type to JSON if it is JSON