guard against nil std_dev