Which test is this ?

Brittany • Expecting our second April 2015 ?
I remember scheduling it my last pregnancy but I actually ended up opting out of it after finding out that it could be dangerous . From what I heard they draw amniotic fluid and do testing on it .. But that's all I know . Does anyone know if this procedure is safe and what exactly they're testing .. My last pregnancy I believe it was going to be done around 16 -18 weeks .