Improved: Custom type handling