lookup field is randomly working and not working

lookup field is randomly working and not working

rec  =  Ride_Matrix1  [Lookup_2 == input.How_long_do_you_plan_to_spend_on_chores];
input.Time_in_Minute = rec.Time_in_Minute;

 I have this code, it works fine if I delete it, then resave it on input of my script, but if I try to use it again without resetting the script I get an error message time in minute is null.

it is not null since it just worked fine the first time, edit access should be turned on please help

trying to lookup the amount of minutes to add to a date time start where input at date time end = date time start plus the minutes at rec.time in minute