SAK-25888 Fix NPE when accessing site directly with PDA portal

When attempting to access a site directly with the PDA portal if the user wasn't logged in then a NPE would be thrown when setting the locale. This copes with the case when there isn't a site yet by adding a check on the site object.

git-svn-id: https://source.sakaiproject.org/svn/portal/trunk@307266 66ffb92e-73f9-0310-93c1-f5514f145a0a