Raise error if account is invalid