Yes, it really should return $null to indicate an error IMO.