I may be misunderstanding your comment, but quest::istaskcompleted() returns 0 for false and 1 for true, so:
Code:
if(quest::istaskcompleted(20)) {
// do something
}
is the same as:
Code:
if(quest::istaskcompleted(20) != 0) {
// do something
}
The first form is just shorthand.