Maybe put the `i` flag on the regular expression to test for `"true"` and `"false"` in upper- and lower-case?