I think I might find out the issue.
The Position property expects an array(if you don’t split it). So the IF condition in expression has to have an array return value if the condition isn’t fulfilled.
if ( time.toFixed(3) == thisComp.marker.nearestKey(time).time.toFixed(3) ) {
value+=[0,40];}else{value;}
Also you don’t need time.value to work. time.toFixed(3) works just by itself.