Add checks to stop invalid options