Prevent exception while sending empty body as application/json