Replace empty? || nil? with blank?.

Shorter, DRYer, same: http://api.rubyonrails.org/classes/Object.html#method-i-blank-3F