ir: Add buildStringConstant helper
semantic: Add retrieveClassFromObject helper to lookup