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

Fixes #10065

See issue for details.
Prior to PHP 5.5, empty() only supports variables; anything else will result in a parse error
http://php.net/manual/en/function.empty.php