The "Switch Costume To" block will accept an Integer (Costume Number) or a String (Costume Name). In cases where this may be ambiguous, some care must be taken to make sure the Costume parameter is cast as intended. See inside for the details.
Thanks to @TheReal_BestGamer (@TheReal-Testaccount) for pointing this out to me.