Can I get set a player head's profile.name off of custom_name NBT data?

My idea here is that I want to combine a nametag with a skeleton skull in a crafting grid. Let's say I have a nametag, and I use an anvil to name it "Notch". If I were to craft with that, can I have the code read the data of the nametag and apply it to the crafted player head? I think that I can do it because the crafting accepts these data arguments, doesn't it? I just haven't really figured out how to give it an arg or return one.
Continue to help post