Added error checking for inputs with boost