Changed if/else hasArgs to use ternary operator instead