[RFC] Fix some unchecked returns for Coverity

Just a few Coverity fixes to reduce the count on the defects so the more important ones can be handled.
This, for example, indicates a problem with `hasFolding`: it's not really a boolean test but a getter.