add exceptions when invalid ubjson