allow error messages to be nil