Collider Get Component throws an exception

Hello, I am trying to extract Rigidbody, but this throws an error:

There is no ‘Rigidbody’ attached to the “Cube” game object, but a script is trying to access it.
You probably need to add a Rigidbody to the game object “Cube”. Or your script needs to check if the >component is attached before using it.

How can I fix this?

Udon paste code

application/vnd.unity.graphview.elements AO1a23LbyBH9FRWeOajpuY+r/LCr9bpcSdZbsVYvsYs1gxlITChAAUmvGdlflod8Un4hPQSvIOwglqiSN1t22cS90d3n9Oke/Puf/7rL3rvpImbP/nKXlYvp9Cd3gxvZpWsmzk/j+M1yNo83bybV1TRmo2wxCXjUMW6Z9YooEQMRZRGIcUBJ6aUH7UpZGo8n39azyXxSV9mzu+xD9oxwCiZXYEFQxeQoW+I+EKByMJJKIy3X8tMoq+oQf3n1wwxtyvAuu7/vRlk5rX9dH3vXnnmZzJ+t7F9Uk/nytf9rLOaX7UvdZZNqNndVEV/9kD2jePPZvMF3WR/O2rfL29cbnd3MirqZTvzo7DI2M7T8uchp+jM6O19M54smPq/iYt646ejs54WfToo/xOVF/bdYPfdaO1lIfDsuIjX2o8w+je5j0mrnw5rUuDBZzO5n1/d1PY2ueljDLhp8xNMz60c3nd3TrlOEsaortOpdsmswYmPhiqgZEKFLiog1gTjNLYlR6ejAaVqwHsQCB5EDk8IYZmCDWSV0rgxjklqtJEL5NwNaoE8v3Lf1r7F5guj4HbT3B+33DRpzvUUpKBskgCGaGk2EZCXxlBdEqGDKGIsiqNCHUqFyyqQEpqzkW5gKpnNLQRjLpE7o7cCUS6oLoJpwV0YkBlMQHzQQW5YSHI1grPtIOwDOootlsABEBYk2lg4vYHgVAEOScGCcZWvcPxTST5kn3Yi0j3xVzTnLx+P6dvyyiW4em4trV43He0cPfq831oZu4znEw306ychcSmakEmIvnlzI3FBBQQHwRMe6E1BVMs8iPoTiQSLAauIlkjyLVhfScF+yFNBTkvLKHQ8bqHtS8mks6qbNeY22jH/CHdvgW6k5QhZI9FoQ4XRBLLWeRCicQkgKr8rj4AuQueAKpGZsVVvb2DPKU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1WPGQxGA9H/mmXXxvynmJe7YKMPENPrealXVzc9BKXGz27mQIOMtRA5CSalT4lntiFDVoSOnBl7rUoSfvjaE5WCU5xxq3qQJYP/KNoH2EcHzRH9sXXbtjY/+BNy7xYXXDd20Vl9J7ZMUoUNaLxI/eoWaKyKkeO+CiNKZP+aIz9Ebg6o0veI6OwH7Xtrq/449Bbn9kn207HvTZdyG8+HA7rVNe/1g3RRwfrCn1ePHw+MHGeuuynoSdABkmLbu+RnmRc6nbwcNm8gM5KhbsMtb88LUtxpASsDpxSJ60dxxAd6caxt5z+eMEC2tfO8TdFwjrZDtUDed1E+8tGT6gXEgXvM2W21//aH99+u348oQm8f9JEyd5cLh80nPyli2GzKGO2YJRmafmVh8siaXhC2OMguSGpg9Oul3ZQIU8GrQM9pRmEo+6GnLfYqyC5TFy7L8dQ+c6FpGIKRCkYcGw/URZ1DPjJMAoKnIsqspwuVsbAFBpzCklY6JdM+gE3YQks/Ah2IsV+DhbYtB1SWhQwnqBHZXhJ4rlKWTdkNfp8966vqZhxWDXPYpTUITsPmQZtvx8NKRJK+FMHOi01WIG13azltHTq42+ek116LLLQ87P/i8WX+EpWvQFGK/HGojh1+9jM3W3b26vYxP7+K+jnD9XQXc0OaBY9QDdMpFbAwffFiAn5JxqyxhXq9Wg7vryEEpe4WDIdPHkM6bfpeJna/OL92m98XW1Sql0+xfVfE9teWcUdlKGOGzFMM6SY3PK/GrTaAZFUD29GQora3KpsOyaNn823yB9eVTTXXMY8v3T8ZLYu0//AQ==

There is no rigidbody, so got to add it. Not much else that needs to be done.

This is true. But I am using Physics.OverlapSphere, it returns objects. Some objects may not contain Rigidbody. I only need objects with Rigidbody