This seems unnecessary, can't we just put `return if newType is type` in switchType?