Analysis of amines and basic compounds