isPlainObject doesn't return true for functions