Fixup for 8766247: Strict type checking also in base class ComposerJson::writeToAdapter().