Should we make that line `except (TypeError, ValueError, ClassCategories.DoesNotExist):` so that we don't accidentally mask more exotic exceptions? (And TypeError will catch pk=None.)