This is "bening" boolean logic a bit. Please keep it simple:

    if x_linear == 0 and z_angular == 0: