Convert type switch to simple assertion

There used to be more than one match here.