corrected a small bug when using a function as id_spec

When a function was used as id_spec, the creation of the db would crash with "TypeError: object of type 'function' has no len()" as it would go into a series of test destined for a list type of id_specs.