Throw exceptions if attributes are not set.