Replaced implicit pointer-to-bool conversion by explicit != NULL check.