When converting the type assertion to errors.AsType in 025418291, the
negation was dropped, so the "real error" warning fired for the normal
missing-condition case (ErrNoValue) and genuine PathValue errors were
silenced instead. This diverges from the v2 implementation the code was
based on. Restore the negation and add a regression test.
Signed-off-by: zjncs <18910855655@163.com>