Can be rolled into the if block above and removes the need for the `mod_name = None`.