Return "" from Named Data getName when invalid
Return "" from Named Data getName when invalid

Fix a small bug where getName was returning an index instead of the name
in NamedData. This was introduced by the last commit where we check if
Named Data is valid first.

Also, added a check to getIndex to see if NamedData is valid first.

simquest/opensurgsim,simquest/opensurgsim,simquest/opensurgsim,simquest/opensurgsim