Determining whether a correspondence is a function