Correctly checked for empty list