Fix NullReferenceException

NullReferenceException thrown if RegKey doesnt Exists