Rather than sprinkle your functions with precondition asserts that arguments aren't null, use the following, self-documenting type as part of the function's signature:

#include <assert.h>
#include <stdio.h>


template<typename T>
class NotNull {
public:
    NotNull(T object)
    : _object(object) {
        assert(object);
    }

    operator T() const {
        return _object;
    }

private:
    T _object;
};


void printNumber(NotNull<int*> arg) {
    printf("%d\n", *arg);
}


int main() {
    int i = 10;
    printNumber(&i);  // fine

    int* p = 0;
    printNumber(p);  // asserts
}