make sure inputs a valid

change from making sure input was not empty, to making sure input is
valid