Safe string equality