Nice idea. Maybe we do:

    use Illuminate\Database\Eloquent\Model;

    // .... 

    if ($item instanceof Model) {

That should keep down any potential oddities with other objects like stdClass being passed in.