Fix checking of NULL or empty OC::$THIRDPARTYROOT/OC::$THIRDPARTYWEBROOT

Fixes #10065

See issue for details.
If there are concerns with ``empty`` it can be replaced with ``!isset($v) || $v == false``, but this code below runs fine on php-5.4.4

```
<?php
class Test {
  public static $emptyvar = '';
  public $property = '';
}

$t = new Test();
echo empty($t->property);
echo empty(Test::$emptyvar);
```

And as per the PHP documentation, what was forbidden before PHP 5.5.0 was passing statements to empty, for me ``$this->foo`` is not a statement but a variable. Or it is?