check state case insensitively