input validation

checking for empty or incorrect input