Am I right that len(" null") here is 5, so it's working incorreclly?
null
is the same as this: "null"
...Which it isn't. Here is some preformatted text.
It might break up the flow of the text, but if something like whitespace is significant, that's probably a good thing.