How to check when graphicview is on background layer

I’m trying to make a plugin that only activates when i am on the background layer, what’s the best way to do this?

i.e. How do I check when a GSBackgroundLayer is selected?

Get the activeLayer and check for its class.

Thank you, so when I try:
print type(Glyphs.font.currentTab.graphicView().activeLayer())
and get a:
<objective-c class NSKVONotifying_GSBackgroundLayer at 0x600003ff2760>
How do I perform a check whether it is a NSKVONotifying_GSBackgroundLayer ?

As with any other types:

if isinstance(activeLayer, GSBackgroundLayer):