If body is not of type string, this should throw `InvalidBodyException`. The same check as in `case "text"`.