def null_value(x): color = 'red' if x is None or (isinstance(x, str) and str.strip(x) == '') or x == 0 else 'white' return f'background-color:{color}'