This is not safe if ``'h5py'`` does not exist anymore within ``intersphinx_mapping`` of astropy.sphinx.conf (a ``KeyError`` would be raised then). If you pass ``None`` as the default value, no exception will be raised in any case and it still works as intended even if astropy removes h5py from their ``intersphinx_mapping`` as well.