Call to a member function getThumbnail() on null

The following problem is please help!

$subString = isset($subString) ? $subString : $profile->getDisplayLocation();
?>

<?= Icon::fa('spin') ?>
>>>> src="<?= $profile->photo->getThumbnail(300, 300, 'crop-center', ['blur' => 80]) ?>" alt=""> <<<<<***
    </div>
</div>
<div class="card-body d-flex flex-column" style="position: relative">
    <h6 class="d-flex justify-content-start align-items-center">
        <span class="display-name">
            <?= Html::encode($profile->getSexTitle()) ?> 
        </span>
    </h6>

Should be $profile->photo().

But what sort of method is the getThumbnail() method? You probably need a file object instead of a field, but since I don’t know the method, it’s impossible to tell.