Add #attributes_before_type_cast method