prevent unknown attribute in hash throws NoMethodError