I think you save a few LOC by extracting this block out. Seems like you'd want the handler to execute nonetheless.