Using a cleaner isFunction check