List tests

Improve some list methods parameter checking, and create associated tests.