IdsQuery: check for list instance, not basestring

Ids may be strings, ints, whatever. Better to check if 'values' parameter
is a list, if not, wrap the value into a single-element list.