To check if panel exists  prior to checking its attributes.

Js error occurred when runAllQueries was called with only one param. Checking if panel exists  prior to checking its attributes is necessary.