FLUID-5201: Updated the isPanel function

Updated the isPanel function to handle more configuration options, including those supplied through gradeNames. However, this still may miss some configuration supplied and should only be used for cases where isActivePanel cannot be used.