[HOTFIX] Removed serializer to serialize media container and added type check in serialization