Update mb_detect_encoding function check