Fixed null checks for strings.