Skip getStaticPaths check for non-dynamic app routes (#54351)
We don't need to apply this check for non-dynamic app routes so this
adds a check to skip it when not necessary.
x-ref: [slack
thread](https://vercel.slack.com/archives/C04DUD7EB1B/p1692366432958709)
---------
Co-authored-by: Zack Tanner <zacktanner@gmail.com>