Use specified macro(NULL) instead of magic-number.

These might be trivial changes. But I think specified-macro(`NULL`) should be returned instead of magic-number(`0`) when a return value of pointer-type is nil.