If it’s a standard SSD it will be fine. The Z97 boards have a m.2 slot that only supports up to 10mb/sec so you won’t really be fit from a MVME drive that much. Z170 and up support 32 mb/sec so they see a much better improvement using NVME drives.
The Z97 boards only support gen 3 x 2 lane PCIE for the M.2 socket. BUT...
You can buy an M.2 PCIE card and get the full benefit of a drive's 3 x 4 PCIE. The boards are inexpensive (mine cost about $15 online) because they don't have any electronics. It's just an M.2 socket and PCIE slot contacts. If you don't have a 4-lane slot available the board works with a 16-lane slot, and probably 8-lane too.
I did that and I am getting full performance from a Hewlett Packard 1TB M.2 NVME. I get about 3 x the real world sequential write performance I got from my previous SATA III. The read performance is similarly fast.
And it boots just fine via Clover, even though my BIOS does not list it as a bootable drive. I simply formatted the drive using Disk Utility, then cloned my boot drive to the M.2 using a commonly available cloning utility.
The HP is *almost* as fast as the 970 Plus, and has a similar MTBF. But it cost half as much.
Side note: my motherboard (see sidebar) shares the PCIE for the built-in M.2 slot with 2 "SATA Express" sockets, which also support standard SATA III. If you use the built-in M.2 socket, you not only won't get full performance from your M.2, but you also lose full use of those two SATA sockets.
If you put your M.2 on a PCIE card instead, you get the full M.2 performance and you also free up those two SATA sockets. That leaves you with a total of 6 native chipset SATA sockets, and 2 additional SATA sockets on the board's added chipset. MacOS sees anything on those last 2 as "external" drives, but you can still boot from them if you want. Just be sure not to "eject" your boot drive!