Fix three cases of comparing pointer to a zero character, where pointers were apparently intended to be dereferenced first and then compared. Found with the help of GCC 7 warnings.