Presence-check function