Check if there is a session, to avoid PHP warnings