REF: a pythonic way to check empty list