General type hint cleanup

* Remove unnecessary `is_object` checks, `instanceof` is enough.
* Add some missing type hints.
* Fix some `Snaks` type hints (not 100% sure about this, please have a look).
* Unify usage of `bool`.
* Add missing newlines at end of file.