I'm ignoring the whole exceptions, purrformance & Google guidelines rant because that is just silly unless you have a use case where you can prove this is hurting you.
If you don't want to deal with exceptions, construct it as
shared_ptr<T> p{r.lock()};
That will create an empty shared_ptr
if r.expired() == true