Oops, mixed typeof with instanceof, fixed.