Turn assert into talloc check.

Which should get more information on error