Check for null or empty list.