The key localUsePresent can be used to query whether a message has the Local Use Section (this section is optional). A value of 1 means the Local Use Section is present and 0 means it is not present.
E.g.,

% grib_ls -p localUsePresent my.grib