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?