Improve the function logic for customizing enable flycheck.