Reference validation based on type and some tests