Handle null strings in Namespace::new.

This also avoids a string copy in the rare case of an unrecognized namespace.
Merge pull request #3465 from Ms2ger/ns

Handle null strings in Namespace::new.