[C++11] Replace some comparisons with 'nullptr' with simple boolean checks to reduce verbosity.