1) For some reason I always return a null value when it hits the If statement or the Compiler gives me a warning saying that the exception is unhandled
could you post any of your "getcomponent" code you are using?
2) As for my Question would it not be better to state in the if that name can not be null and also can not be a zero length string and just use a few If Else Statements to handle all outcomes?
an empty string is "allowed" for the dictonary, and who am I to forbid the usage of that?

if you put a breakpoint on the evaluation line, what is filled in the "name" variabel?