added check_ref method and some tests and documentation for it

Added a check_ref method to Validator