improve list cast (allows for other iterables, too)