Test that $_GET['pi'] actually has a value

There was an error in my previous commit that stops the subscribe, preferences, etc pages from working.

The oversight was that $GET['pi'] seems to be defined even though the url query does not have a 'pi' parameter.