Apparently there are scenarios where CurrentAppearance is not
set by the client on HostResourceProvider (UITools sets it but
vsmac doesn't currently) nor is NSAppearance.CurrentAppearance
set on the current thread (perhaps the thread is newly
created and AppKit didn't get a chance to set it), causing
bug 1468252.
To protect against that, we check if both are null and in that
case just assume it's light theme rather than generate an NRE.
Fix AB#1468252
Apparently there are scenarios where CurrentAppearance is not set by the client on HostResourceProvider (UITools sets it but vsmac doesn't currently) nor is NSAppearance.CurrentAppearance set on the current thread (perhaps the thread is newly created and AppKit didn't get a chance to set it), causing bug 1468252.
To protect against that, we check if both are null and in that case just assume it's light theme rather than generate an NRE.
Backport of #789