Implement null_to_na in C.