Updated string comparisons for simpler null checks