add support for NilClass
Merge pull request #4 from ivanov-aleksey/master

NilClass