added functions to case-insensitively compare strings that might be NULL