fix some erroneous uses of `casecmp`

`casecmp` returns -1/0/1, never false or nil