Add tests for deep validation and fix isValid() signature inconsistency