Can I return null to a RaycastHit? c#

I have a function that checks a raycast for collision, but in context it can not handle to hit data within itself. I am sending the RaycastHit out to a variable.

Can I have

RaycastHit FireBullet()
	{
		if(Physics.Raycast(hit)
		{
			return recentHitMeta;
		}
		else 
		{
			return null;
		}
	}

where hit = FireBullet,

and I then check if FireBullet = null?

No, you can not because RaycastHit is a structure (value type of struct) and is not nullable.

But you can create a RaycastHit structure at the place where you want to use the Raycast hit information returned by FireBullet. And set this RaycastHit structure from FireBullet if raycast was hit. And from FireBullet you can return a bool for if raycast was hit or not. Then if bool is true then only use the information from that RaycastHit structure. However, this method needs FireBullet to have access to your RaycastHit structure in order to access it and set its value.