Can `type` ever be `null` here?