Here is another way to do it:
isempty = (dict1 and True) or False
if dict1 is empty then dict1 and True will give {} and this when resolved with False gives False.
if dict1 is non-empty then dict1 and True gives True and this resolved with False gives True