Add assertions according to review comments