added check to see if 'content-type' is set

this prevents server crashes if requests are sent with an empty body
like:
jQuery.post("http://localhost:3000/comments/",{},function(data){
   console.log(data)
});