In the autoreload module, check if the filename is not None before checking it