You can try if(string is null) - is instead of ==. Though usually in D, I just if(string.length == 0) and treat empty and null the same way.This is likely not what you want, it's generally not important where a string is located.
I think you were replying to the first sentence, but I recommend the second sentence: just always use `if(string.length)` and forget abotu where it is stored.