add support to handle no argument and invalid option