Afaik, there are quite a few situations and issues related with Revit displaying a question mark for a tag value:
Hard to tell off-hand whether the behaviour you observe is caused by your approach or some other factor... Maybe some of those discussions will help clarify?