and here it'd be 

var/picked = input("Select headwear to change it to", "Chameleon Hat")as null|anything in clothing_choices
if(!picked || !clothing_choices[picked])
  return
var/obj/item/clothing/A = new clothing_choices[picked]