Role of oxygen in materials properties of yttrium trihydride