Fix null pointer dereference in Prepare
Please don't use "add file"/"update file"/"fix file"/etc. commit messages. These are hard to reason about when looking at the history of the file/repository. Instead, please write explanatory git commit messages.

The commit message is also the title of the PR if the PR has only one commit. It is thus twice important to have commit messages that are relevant, as PRs would be easier to understand and easier to analyze in search results.

For how to write good quality git commit messages, please consult https://cbea.ms/git-commit/  cc @mihaimaruseac 
Fixed `params` checking, renamed commit and PR @gbaned, can we proceed with merging this? Still needs to go via internal CI and review. See https://github.com/tensorflow/tensorflow/blob/master/CONTRIBUTING.md#typical-pull-request-workflow--, especially the diagram at the bottom
The bug was found by Svace static analyzer:

1. params may be null because it is checked for null on https://github.com/tensorflow/tensorflow/blob/r2.12/tensorflow/lite/kernels/add.cc#L143
2. later it is zero-dereferenced by params->activation

cc @mihaimaruseac
