def _is_null_valid(rgb_p2p, rgb_valid_sbsw):
    """Check wehther null is valid or not.

    Parameters
    ----------
    rgb_p2p : list[int, int]
        (first, last) range bins of peaks of a pair of adjacent beams
    rgb_valid_sbsw : np.ndarray[np.ndarray[int]]
        2-D array-like integers for valid range bins of a specific range line

    Returns
    -------
    bool

    """
    # A DIVISOR to define left/right margins to be excluded.
    # an integer equal or greater than 4!
    # Note that the current requirement for EL pointing error is around 250
    # mdeg which is one-quarter of p2p EL coverage (~ 1 deg) for NISAR.
    margin_divisor = 6
    # Null region is defined two-third of p2p centered at mid region
    rgb_margin = (rgb_p2p[1] - rgb_p2p[0]) // margin_divisor
    rgb_null_region = {rgb_p2p[0] + rgb_margin, rgb_p2p[1] - rgb_margin}
    # check if null overlaps with TX gap
    flag = False
    for start_stop in rgb_valid_sbsw:
        flag |= rgb_null_region.issubset(range(*start_stop))
    return flag