PLAT-364 Use value equality and add a test

Per @inez I'm using value equality when checking for 0 on strcasecmp.
I'm also adding a test for this method. If we had tests for this method
we probably would not have this bug because the tests would have failed.

/cc @inez