Be able to use a boolean function

Inspired by https://github.com/gulpjs/gulp/issues/129