[minor] Rather than the two hidden "ifs", how about
```
if (data == null) {
  Exception exception = new HttpResponseException(command, response);
} else {
  new HttpResponseException(command, response, new String(data));
}
```
?