Added more tests on error messages. Renamed isValid to True and fixed bug with or'd assertions and bool val.