Add bad value detection