[TypeCheck] Deny function redefined with other function or global variable and Check main function