Use explicit boolean compare instead of implicit float -> boolean conversion
Merge pull request #3417 from folecr/cleanup

Minor code cleanup