Add support for null and undefined

Resolves #1