If links is always an array then I think you want to use #empty? (#any? is slightly less performant).