[WIP] Input validation refactoring

Refactor input validation to make it more consistent.

Todo
* [ ] Tests
* [x] docstrings
It assumes that you a `.data` which is not the case for each situtation.