To check if panel exists  prior to checking its attributes.
Merge pull request #39 from thehyve/issues/fix_panel_undefined_error

To check if panel exists  prior to checking its attributes.