Attempt to read property transaction on null error in Laravel 8.0

Trying to add a new property to request using the prepareForValidation, by using the 'id' from the URL to fetch the relationship model. 

But I am continuously getting error as:

Attempt to read property "transaction" on null error.

This is the code I am using, not sure what is wrong in this-

protected function prepareForValidation()
        'tns_id' => History::find($this->route('id'))->tns->tns_id,