[MRG] Input validation refactoring

Refactor input validation to make it more consistent.

Todo
* [x] Tests
* [x] docstrings
Hum, that change is really surprising for me: I would read the 2 lines (the one removed and the one added) as doing very different things. It's probably just a question of choice of names on the arguments.