Detect invalid arguments and handle /? and -?