Influence of Defects on the Stability and Hydrogen-Sorption Behavior of Mg-Based Hydrides.