RXJava logical map chain

I have following code written in RXJava.

validateProduct(payload)
.map.(r -> {
    if(r.getBoolean("valid")){
        return createProduct(productPayload);
    }else{
        return null; // request.end() | end the chain here with some message as invalid product.
    }
})
.map(r -> {
    return linkCategories(catPayload);
})
.map(r -> {
    return linkTags(tagPayload);
})
.doOnError(e -> log.error(e))
.subscribe(r -> {
    JsonObject response = new JsonObject().put("status", true);
    request.end(response);
}, e -> {
    JsonObject response = new JsonObject().put("status", false);
    request.end(response);
});

The first block has a condition check, this code is not working right now. Whats the best way to handle conditional chains in RX?