metadata: fix crash should grabber not be defined

Fixes #12206

(cherry picked from commit 419e06b45068a088dc28caf7c9e6999ee3c93231)