Better anonymous type handling