Add n_val check to test