Add attributes to avl functions

This PR redoes #140
With your proposal, there are two cases:

1) The code does a `NULL`-check on its own. Using a function from the outside (from outside the library) can lead to a runtime error, as if someone passes `NULL` accuidentially, the code recognizes this and returnes with failure.

2) The code has no internal `NULL` checks, so we cannot accidentially compile something which passes `NULL` somewhere, but the user can. This would result in a segfaults somewhere.

Having both the runtime-`NULL`-checks and the compiletime checks prevents as much errors as possible. So why not having it?