Replace instanceof Object with Object::toString.call(..) -- Related to #1555
Remove unnecessary check against function
Remove extra parenthesis