prevent null class names when no class is supplied