[fix] Do not use len() to determine if a sequence is empty
[fix] Do not use len() to determine if a sequence is empty

Change-Id: I797fcb86f09797acbf0158fd465c07b611b75be8

wikimedia/pywikibot-core,wikimedia/pywikibot-core