* add Conditions to check std::shared_ptr is not null