Added documentation and test for ifAny helper.
Fixed and simplified ifAny helper.