my editor was complaining about unset variables, so let's add some early returns to fix that and reduce indentation/cognitive load.