Don't write out the 'defaultClass' attribute if no class is provided, so
we don't have to have a check for an empty String rather than a null.