Synthesis, characterization and magnetic properties of crystalline electrides and alkalides