IMO, as one who's done a lot of whitewater canoing but just a little flatwater kayaking...
It depends overall how comfortable you are with such vessels and around the water in general.
If very comfortable and confident, sure, try some light rapids with the kayak.
In unsure, start with flatwater.
Biggest thing with kayaks is it's easy to tip and fairly easy to roll. KNOW how to rollout if you flip. You do NOT want to get caught in a backwash and not know how to roll.
Not trying to be freaky, but whitewater has hazards.
Check this - (first I've seen it but a good list):
Have a nice, fairly easy bay nearby? Do that. Enjoy an easy paddle through the marshes. Get comfortable...
Just don't jump in higher-class rapids without being VERY comfortable (lessons can't hurt).
All that said, shooting class 5 rapids is pretty damn awesome (at least, in a canoe with a competent bowman
Don't Lie - Be Kind - Realize your Potential