you could do if (getArgs && typeof getArgs === 'object')? Slightly less verbose...