if condition for empty list in python