TypeError: Cannot read property 'contains' of undefined

Aha, maybe just test both then?
(grabbed !== null && grabbed !== undefined)