fix checking for FormData existence

in Safari, typeof FormData returns "object" instead of "function"