Added assert  to verify that the unique_ptr are not null