checking for empty list ref #384