Checking if an equation represents a function