You get it because "CurrentUser" is null, if you learn to debug your code, or googled the error message you could have discovered that yourself. It will be null because the OpenSubKey line above returned null.
If you consult the documentation for OpenSubKey
RegistryKey.OpenSubKey Method (String, Boolean) (Microsoft.Win32)[
^]
you'll see that it returns null when the key doesn't exist. So amend your code to create the node if it doesn't exist.