Code refactors and fix for expectFn.call() context.

Refactors with isDefined(), isFunction(), isObject() utils.
Now uses `expectFn.call( this, … );