Use ruby's [nil?](http://ruby-doc.org/core-2.1.0/Object.html#method-i-nil-3F) method.