all: fix warnings with shared_ptr null