Reduce cost of checking for keywords in typeWithKeywords