revparse: Use more idiomatic error value test