Check for array_key_exists if tag_name is set

Fixes xavierlacot/sfDoctrineRestGeneratorPlugin#30