Implement safety test to ensure 'f implements IFn.

Update comments accordingly.