check_myfun function

Checks myfun object before it is passed to applyExtfunction