Empty arrays are true but they\'re also equal to false.
None of the above helped me, when trying to use the knockout.js mapping plugin, perhaps since an "empty array" isn't really empty.
I ended up using: data-bind="if: arr().length"
which did the trick.
This is specific to knockout, not the OP's question, but maybe it will help someone else browsing here in a similar situation.