Avoid SQL query failures if no popular IDs are found