Fix if-statement that always evaluates True
Merge pull request #2705 from b6d/utils-fix

Fix if-statement that always evaluates True