Validates that the given value meets this invariant.
A Result containing either the value if the invariant holds, or an error if it doesn't
The value to validate