update typeof function check to use LoDash _.isFunction as recommened by doowb