A couple options:

```php
    $associated = $object->association($alias);
    if ($associated && $associated->target()->hasField($field)) {
     ...
    }

An alternative that guarantees the column can actually be used in this query:

```php
    $contains = $object->normalizedContainments();
    $assoc = isset($contains[$alias]) ? $contains[$alias] : false;
    if (!empty($assoc['canBeJoined']) && $assoc['instance']->target()->hasField($field)) {
     ...
    }