validates the size of the list before running through it