Improve type handling for properties/functions