we dont have to check for the existence of klass.name_attribute in the array:
if the field_names array does not contain the klass.name_attribute, then the array is not changed and nil is returned.
Otherwise the klass.name_attribute is removed and returned.