Some PHP version or configuration were causing this error.
On app.blade.php of local branch, I could use "$usedItems ? :"
even if $usedItems were null, but I had to check an "isset" to the production.
On HomecController, I had to change the "object" parameter of getUsername
to "\Illuminate\Database\Eloquent\Collection" to make it work.
I took the chance to just show the number of itens in use
if it were greater than 0.
It was necessary to keep refreshing the page to
check if an item was returned when we did not
want to be alerted. So, now, the page refresh
itself every 2 minutes (while I do not know how
to use Laravel broadcasting) and the title shows
the number of items in use (including when used
by you).