Former Malaysian minister Nik Nazmi Nik Ahmad has confirmed that he was one of two individuals detained by the Selangor Islamic Religious Department (Jais) over an alleged khalwat case.