Read this great article Stop checking for NULL pointers! It mentions that there are many other invalid pointers than NULL, which is the same idea I had recently with regard to foreign keys in databases.
Stumbled upon the Null (SQL) Wikipedia article. Looks interesting. Will read.
If you have a list of file names separated by new lines, and you want to turn it into a list of file names separated by null characters, for instance for use as input to xargs, then you can use the tr command, like this:
$ cat /path/to/new-lines | tr '\n' '\0' > /path/to/null-separated
I found a whole article on various ways to replace text on *nix: rmnl — remove new line characters with tr, awk, perl, sed or c/c++.