convert pg boolean value into js compatible boolean