unified checking for case insensitive values