Add InvalidFieldError
simpler syntax for trivial classes