Add attributes to avl functions

This PR redoes #140
Because you say that a function will not accept a `NULL`-pointer when, in fact, you depend on it accepting `NULL`-pointers --at least for those two functions.
Worst thing that could happen would be someone saying "Ah, that function should not take `NULL`-pointers. Let's optimise it by removing the check!".