Finished Average Length and Implemented Type Check with  Regex