Check for array_key_exists if tag_name is set

Fixes xavierlacot/sfDoctrineRestGeneratorPlugin#30
Merge pull request #32 from Recras/30-tag_name

Check for array_key_exists if tag_name is set