Is my unity component validation overkill?
Right now you are calling GetComponent&lt;T&gt;() twice if the first call return a value != null.
Well, I would do this in a very simple way.
private void OnValidate()
{
    rigidbody = GetComponent&lt;Rigidbody&gt;();
    if (rigidbody != null) { return; }
 
    rigidbody = gameObject.AddComponent&lt;Rigidbody&gt;();
}