Improved variable type detection for Monkey language