Add size check

grn_obj_cast() doesn't set record ID for nonexistent key and returns
GRN_SUCCESS. So a bulk object for record ID may not have any data.

In this change, treat no data record ID object as null.
Indent