Replace OwningPtr::isValid() with conversion to bool.

This is a precursor to moving to std::unique_ptr.