Utility functions for checking references
