Make substr_compare ignore the length if it's NULL. This allows to use the last parameter (case_insensitivity) with the default length.