Added test for $arg defined to avoid warning message