Fixing null pointer exception if a stacktrace frame does not match the expected format. Fixes issue 7977