Variety Invariants for Modular Lattices