Determination of quaternary ammonium compound