OF_APPLICATION_DELEGATE(): Improve type checking

This is done at compile time now rather than at runtime.