There are at least two ways to find out if the add-on is enabled.
First one is to query the entity directly:
$this->finder('XF:AddOn')->where('addon_id', 'myAddOn')->pluckFrom('active')->fetchOne();
The other is to get the list of active add-ons and see if yours is there:
\XF::Repository('XF:AddOn')->getEnabledAddOns();