Probably better to change to:
if not obj: