Perhaps the exception is occurring within the SelectedTag constructor.

That's only a guess. Consider posting some code that compiles but throws that exception when it is run. Make the code as...