I have a function like this:

```
void Test(std::wstring test1)
{
   cout << test1.c_str();
}

```

When I call it like this:

```
Test(NULL);

```

I get runtime exceptions like "invalid handle" and the entire program crashes. I can't do a null check on parameter 'test1' because the compiler says it can't be null. I'd like to either prevent a NULL from being passed in the first place, or have a way to check for NULLs at runtime. How can I solve this problem?