This logic is for handling either lists or string inputs.  Do you need to handle both?