improved isPluginClass check