Check len(args) before checking trying to access args[0]