CHECK_NOTNULL works with smart pointers when compiled in C++11.