Fixing issues with var args when invoking it with null value or empty args

Currently if you call a method with varargs with no arguments it throws null pointer. Also if you call it with an argument with null value like var foo = null; a.method(foo) it throws npe.