Add type guards and type constraints checking.