title: C++ How to detect when nullptr is passed to function where std::string is expected?
body: <p>i could not find threads giving a clear answer on this - </p>
  
  <p>i have a constructor, for example:</p>
  
  <pre><code>FanBookPost::FanBookPost(Fan* owner, std::string content);
  </code></pre>
  
  <p>Fan is another class in my code, but content is the problematic one:</p>
  
  <p>since std::string is not a pointer, i would expect that calling the constructor with (fan, nullptr) would not be possible. however, it compiles! ... and crashes at runtime with EXC_BAD_ACCESS.</p>
  
  <p>is this avoidable? </p>