Refactoring: use isDefined & isUndefined where needed
Refactoring: create & use isFunction(v)