Adds some asserts to generated cpp code

Hopefully this makes it easier to debug failures when a client hasn't
been set.

BUG=none
TEST=none
R=yzshen@chromium.org

Review URL: https://codereview.chromium.org/699893004