Added handling of special case when mtime is None.