Add missing GRN_ID_NIL check for plugin