Capacitive sensor used in quality check to confirm presence of caps on bottles