The behavior of Facter.fact has changed between 4.0.52 and 4.1.0. Instead of returning nil if a fact does not exist, it now returns an object of type ResolvedFact with its value set to nil.
The correct and documented behavior is to return nil if a fact does not exist: https://github.com/puppetlabs/facter/blob/main/lib/facter.rb#L407-L408