Add type checker. Fix normalization with non-empty context

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
checkpoint

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>