[#78198458] Add conditional for nullptr.