http code 204 was causing an error 500

When trying to send back $this->response(null, 204) the code would
crash when handling the empty data.