you could also write this as
```
if !links || links > iterable_cats.length
```
OR
```
if links.nil? || links > iterable_cats.length
```
OR
```
links = 1 unless ( links < iterable_cats.length && !links.nil?)
```
for a one-liner :p