instead of all these case-specific "if (lnull || rnull) {" blocks, have one at the top:

    if (isNull() || rhs.isNull()) {
        return getNullValue(vt);
    }