Unify IOPlugin implementations further

Following on from the last commit, this unifies the code style of each
of the three main IOPlugin implementations (for datasets, LUTs and text
files). It also actually guards against nulls for DatasetIOPlugin too,
which the previous commit did not.