Added visitors to check type compatibility