Fixing #31 php notice

## Ready State yes

Issue: https://github.com/imagex/imagex_patches/issues/31

Adding in some basic sanity checks to the IF statements so the php doesn't throw notices about undefined properties