Added more checks in BerDecoder.