[WIP] Input validation refactoring

Refactor input validation to make it more consistent.

Todo
* [ ] Tests
* [x] docstrings
that is true. The tests seem not to be so great ^^ we need to add a test for that.