Instead of using inheritance checks, just check for the presence of a loader attribute. This means it should work with things such as pyjade.ext.django.Loader.