Add value and type check for mib get/set function

Signed-off-by: leo-ma <begeekmyfriend@gmail.com>
This is too complicated. Why not use:

```
lcoal type_match_table = {
    [BER_TAG_OPAQ] = 'number',
    [BER_TAG_XXXX] = 'table',
}

if type_match_table[g] ~= v then
     error('balabala');
end


```