check if [] method is exist before extracting field because ruby 1.9's OpenStruct doesn't have one.