Ambiguity check and type families