[hook] use `serializer.doc_type` if exists (closes #17069804) [applied]