Welcome! Please see the About page for a little more info on how this works.
The name function throws NullPointerException on nil. Since the name function is about obtaining the string form of a specific object it should not throw on nil. It should just return the nil object as the str fn does.
Comment made by: wagjo
added patch with test