Check for valid reference