Since Varnish 5.1 (2017), we can just return; (with no action) from user-defined subs to exit early.
return;