Fix bug in method: empty list is a 'true' in an if condition

Stupid bug that I introduced when refactoring.

an empty list [] in ruby still means 'true' in an if condition.

It's not the same as python, silly!