This is migration code from when we renamed type to protocol.