is it truly necessary to compare against int here?  Checks against numeric types can be dangerous, much better to check the opposite case, e.g. if it is an iterable