abandon use of instanceof for function checking because it is fragile and can be easily faked with `Object.create()`