Fix coverity warning for null pointer.
Fix coverity warning for null pointer.

Instead, throw an IOException since something has gone wrong reading the
file.

Unidata/netcdf-java,Unidata/netcdf-java,Unidata/netcdf-java,Unidata/netcdf-java,Unidata/netcdf-java,Unidata/netcdf-java,Unidata/netcdf-java