Copy-File - How does $fileCopyError work?

I was using Copy-File as a reference, and I’m completely confused by $fileCopyError.

For starters $null = $fileCopyError. With my understanding of PowerShell, and my limited testing, this does absolutely nothing, right?

Then there’s If ($fileCopyError){}. Where id $fileCopyError get set to anything. Perhaps understanding what $null = $fileCopyError will answer this question, but right now I’m stumped.

It does nothing. $null is always a variable devoid of value, cant be changed. Maybe it was supposed to be $fileCopyError = $null since that erases the variable. When testing whether a variable is equal to $null, one should put $null first in the comparison ($null -eq $fileCopyError) so maybe both of these confused the person writing that function?