[C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr.
Add back some typecasts I accidentally lost in r206142.