Ah, yeah the error makes sense. I expected the error, just wanted to understand how Brand was meant to be actually assigned to a primitive. I'm not sure the function is necessary though. This does the same thing
const accountId = "125314" as AccountId
It makes sense that the technique uses casting.