use '=== Nil', not '~~ Nil'