Clean up crazy if statement into a nice unless