Return strings instead of arrays if input is string