Fix ClassCastException in TilesConfigurer

Issue: SPR-10195
Fix exception message about producible media types

Issue: SPR-10175