Solved hacked issue
Some documentation + more robust type checking