Add logic to avoid error on empty args

Created also test to enforce the logic