Added a couple of isset() checks to avoid php notices when running the p...

...lugin in a dev environment with strict errors on.