Refactor test to not care about the specific result of valid?

Only care about its truthiness rather than asserting specific true/false
values. If we need to check for the return value in particular, there will
be a test for that.