Fix bug when page does not contain a TOC

If this plugin is used in a page without a TOC (e.g., the sidebar), it produces the following error and does not show any content:

PHP Warning:  array_merge(): Argument #1 is not an array in /var/www/dokuwiki/lib/plugins/condition/syntax.php on line 264

The change fixes this by moving the check to the right place.