.nil? on anything in ruby returns true or false based on whether its value is nil or not.
Remember only false and nil return nil in ruby. Nothing else returns nil.
0.nil? #=> false
[].nil? #=> false
"false".nil? #=> false
nil.nil? #=> true
false.nil? #=> true