Explicitly check whether the meta-attribute name is valid

Sometimes the class may simply have no properties, but the
meta-attribute name is still valid and we shouldn't die.