next-codemod(upgrade): optional catch when missing dev script (#71598)
### Why?
During the next-codemod upgrade, when the `dev` script is missing, it
throws while reading `.includes` the undefined value.
Fixes #71597
---------
Co-authored-by: Jiwon Choi <devjiwonchoi@gmail.com>