Checks whether ids are correctly defined. If not throws an error
assert_ids(ids)
ids
maximum number of ids to retrieve