Fix wrong work with Exception object (only class objects have __name__ property, not instance)
See https://github.com/toastdriven/django-haystack/issues/631