How can I validate that I am passing an Asset into my custom twig filter? I'm creating a custom twig filter in Craft 3 and am struggling with a really simple thing.

{{ entry.backgroundImage.one() | filter }}


In my filter, I would like to validate that I am being passed an asset.

if (!$asset instanceof Asset)
{
    return false;
}


What should I be checking the object against? Asset or something different?
Actually, you had your code just right imo:

use craft\elements\Asset;


...

if (!$asset instanceof Asset) {
    return false;
}