Move parsing of boolean options into its own method.