Sanity check before decoding