String removeNullability(String type) { if (type.endsWith('?')) { return type.substring(0, type.length - 1); } return type; }