[1.6.x] Merge pull request #1582 from rca/12756-missing-yaml-module-serializer-error-message

Fixed #12756: Improved error message when yaml module is missing.

Backport of 4f5faa1916e7c8cb72cc9ebf1a1fd964ba6e707b from master.