fix art.t test failure on alpine linux
fix art.t test failure on alpine linux

Summary:
Looks like we end up with root_ holding a nullptr after
the associated test is finished.  This only seems to be a problem
in practice on Alpine linux's musl libc based environment, and
only when built with `-O2`.  Not sure if this is a c++ standard
library implementation issue or a compiler optimization, or a
combination of both of those things.

Guard against that with a simple nullptr check.

Refs https://github.com/facebook/watchman/issues/546

Reviewed By: simpkins

Differential Revision: D6681244

fbshipit-source-id: f119b3552c0aeedc325fa83c71b12745536b1dac

nodakai/watchman,wez/watchman,facebook/watchman,nodakai/watchman,facebook/watchman,wez/watchman,facebook/watchman,facebook/watchman,wez/watchman,wez/watchman,nodakai/watchman,facebook/watchman,facebook/watchman,nodakai/watchman,facebook/watchman,nodakai/watchman,facebook/watchman,wez/watchman,wez/watchman,nodakai/watchman,facebook/watchman,wez/watchman,wez/watchman,wez/watchman,nodakai/watchman,nodakai/watchman,nodakai/watchman