Checked to see if inputs matched a certain length and threw errors if it was not or if the input was empty