Added nil exception throw if trying to create an error without a domain.