Improve nil support
(issue #42)