Characterization of erbium doped lithium niobate crystals and waveguides