Testing the validity of a reference