If an element is being used elsewhere in the site via the elemental-virtual module then this error is thrown when trying to open the original element for editing.
[Emergency] Uncaught TypeError: method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given
GET /admin/pages/edit/EditForm/1/field/ElementalArea/item/2/edit
Line 149 in \vendor\silverstripe\framework\src\Forms\GridField\GridFieldSortableHeader.php
SilverStripe v4.9.0 PHP v8.0.21
If an element is being used elsewhere in the site via the elemental-virtual module then this error is thrown when trying to open the original element for editing.