made isValidString function complete

filled out the isValidString function