IIRC, the return value is `null|AssetInterface`. An explicit type check is not needed. `if (!$res) {` is enough