Is my unity component validation overkill? Unity scripts need access to components they will be using, my solution here guarantees that a script will have a valid reference to a component it needs, but is this solution overkill, or hard to discern intention from?
Note: null coalescence operators would be cleaner but cannot be used for unity objects or components for terrible reasons.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

[RequireComponent(typeof(Rigidbody))]  // disallows deletion of component from editor
public class CubeControll : MonoBehaviour
{
    [SerializeField, HideInInspector]
    private Rigidbody rigidbody;

    private void OnValidate()
    {
        rigidbody = GetComponent&lt;Rigidbody&gt;() != null ? // if has component attached
            GetComponent&lt;Rigidbody&gt;() :  // assign referance
            gameObject.AddComponent&lt;Rigidbody&gt;(); // else add new component
    }

    // start, update etc
}

This is a common situation, are there any general best practices to doing this?
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;();
}