Python Test If Variable Is Iterable