Updated view.file_name() to check None type