Support type coercion in getters and setters