iMac 27-inch, Late 2014, RAM upgrade size combinations
The general rule is you can mismatch sizes in pairs but not in individual slots.
Computers use interleaved memory, which requires each pair of slots to be populated with the exact same RAM. Having mis-matched slots will 'break' the interleaving &amp; slow down the RAM access. As far as I'm aware this isn't 'dangerous' at all, merely slower.  

Some machines can also use triple-channel memory, where three matching memory sticks can be interleaved. I don't know whether your iMac can do that, it may only be the Mac Pros that can - though in this case would make your issue harder to solve [I'm just including it for completeness]

So, your ideal way to achieve 32GB would be 4 x 8GB, which is probably cheaper than 2 x 16 anyway. If you keep the existing 4's I would add a pair of 8's.

Crucial's RAM configurator, on a quick search [check for your exact model] shows no 16GB sticks at all.