Use .empty? instead of .nil?