not adcampaign_ids where type(adcampaign_ids) == list is logically equivalent to len(adcampaign_ids) == 0 and performs better.