More robust validation of build options