get_db_prep_value hack for some django flaws

Hack to workaround flaws in Django where django will try to be helpful
and conveniently call a callable in various places.
No need to do that in any situation, as the client code should
explicitly call a callable itself.
Solution: undo the call of a type constructor by taking the instance’s
type.