How can one check if an object exists before calling a method in PHP?

To check if an object exists before calling a method in PHP, you can use the `isset()` function to determine if the object variable is set and not null. This helps prevent errors like "Call to a member function on null" by ensuring the object exists before attempting to call a method on it.

// Check if the object exists before calling a method
if(isset($object) && is_object($object)) {
    $object->methodName();
}