Fix a Clang static analysis error and related bug in ByteVector::containsAt(). (#460)
Fix Clang static analysis errors concerning null pointers. (#460)
Also fix a wrong parameter checking.