Only call ui.playSound if sound is a string