proper way of testing empty list