It's ok to use strings instead of number to select midi ports, it's even more reliable to do so since port numbers may change depending on external factors like connection order. (Populating OSC Midi Ports (manually?) - #2 by jean-emmanuel).
1 Like