What is the best way to ensure that a user-defined function is always passed an object as its single parameter?